{"action":"created","issue":{"url":"https://api.github.com/repos/formers/former/issues/238","labels_url":"https://api.github.com/repos/formers/former/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/formers/former/issues/238/comments","events_url":"https://api.github.com/repos/formers/former/issues/238/events","html_url":"https://github.com/formers/former/issues/238","id":23855197,"number":238,"title":"[L4] Populator from Array and Relationships","user":{"login":"henriquebim","id":6003493,"avatar_url":"https://avatars.githubusercontent.com/u/6003493?v=3","gravatar_id":"","url":"https://api.github.com/users/henriquebim","html_url":"https://github.com/henriquebim","followers_url":"https://api.github.com/users/henriquebim/followers","following_url":"https://api.github.com/users/henriquebim/following{/other_user}","gists_url":"https://api.github.com/users/henriquebim/gists{/gist_id}","starred_url":"https://api.github.com/users/henriquebim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henriquebim/subscriptions","organizations_url":"https://api.github.com/users/henriquebim/orgs","repos_url":"https://api.github.com/users/henriquebim/repos","events_url":"https://api.github.com/users/henriquebim/events{/privacy}","received_events_url":"https://api.github.com/users/henriquebim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2013-12-06T12:47:33Z","updated_at":"2015-03-04T17:15:04Z","closed_at":"2015-03-04T17:15:04Z","body":"Hello,\r\n\r\nI'm having some problems with the populator.\r\nI started populating from Eloquent instance, but later needed a Presenter, so I included auto-presenter (https://github.com/ShawnMcCool/laravel-auto-presenter), after including it, populating stopped working. I figured I should populate from database and not from presenter, so I used ->toArray() in Eloquent's model.\r\n\r\nThings got populated, but not relationships (I'm currently using address[street], but tried using address.street and got the same result).\r\n\r\nDigging in the source code of Populator, I found this lines (Former/Populator.php:39~41):\r\n```PHP\r\nif (is_array($this->items)) {\r\n      return parent::get($field, $fallback);\r\n}\r\n```\r\n\r\nIt seems it try to get \r\n```PHP\r\n$items['address[street]']; // (or items['address.street'])\r\n```\r\n\r\ninstead of \r\n```PHP\r\n$items['address']['street']\r\n```\r\n\r\nThe quickfix I found is removing the above 3 lines.\r\n\r\nAny thoughts on this? :)"},"comment":{"url":"https://api.github.com/repos/formers/former/issues/comments/77201098","html_url":"https://github.com/formers/former/issues/238#issuecomment-77201098","issue_url":"https://api.github.com/repos/formers/former/issues/238","id":77201098,"user":{"login":"claar","id":402855,"avatar_url":"https://avatars.githubusercontent.com/u/402855?v=3","gravatar_id":"","url":"https://api.github.com/users/claar","html_url":"https://github.com/claar","followers_url":"https://api.github.com/users/claar/followers","following_url":"https://api.github.com/users/claar/following{/other_user}","gists_url":"https://api.github.com/users/claar/gists{/gist_id}","starred_url":"https://api.github.com/users/claar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claar/subscriptions","organizations_url":"https://api.github.com/users/claar/orgs","repos_url":"https://api.github.com/users/claar/repos","events_url":"https://api.github.com/users/claar/events{/privacy}","received_events_url":"https://api.github.com/users/claar/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T17:15:04Z","updated_at":"2015-03-04T17:15:04Z","body":"Closing old inactive issues to make project maintainable."}}