{"action":"created","issue":{"url":"https://api.github.com/repos/laracasts/TestDummy/issues/83","labels_url":"https://api.github.com/repos/laracasts/TestDummy/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/laracasts/TestDummy/issues/83/comments","events_url":"https://api.github.com/repos/laracasts/TestDummy/issues/83/events","html_url":"https://github.com/laracasts/TestDummy/pull/83","id":61168292,"number":83,"title":"Allow overriding relationship attributes using dot notation syntax","user":{"login":"adamwathan","id":4323180,"avatar_url":"https://avatars.githubusercontent.com/u/4323180?v=3","gravatar_id":"","url":"https://api.github.com/users/adamwathan","html_url":"https://github.com/adamwathan","followers_url":"https://api.github.com/users/adamwathan/followers","following_url":"https://api.github.com/users/adamwathan/following{/other_user}","gists_url":"https://api.github.com/users/adamwathan/gists{/gist_id}","starred_url":"https://api.github.com/users/adamwathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamwathan/subscriptions","organizations_url":"https://api.github.com/users/adamwathan/orgs","repos_url":"https://api.github.com/users/adamwathan/repos","events_url":"https://api.github.com/users/adamwathan/events{/privacy}","received_events_url":"https://api.github.com/users/adamwathan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-13T18:14:16Z","updated_at":"2015-03-18T01:27:03Z","closed_at":"2015-03-15T02:34:32Z","pull_request":{"url":"https://api.github.com/repos/laracasts/TestDummy/pulls/83","html_url":"https://github.com/laracasts/TestDummy/pull/83","diff_url":"https://github.com/laracasts/TestDummy/pull/83.diff","patch_url":"https://github.com/laracasts/TestDummy/pull/83.patch"},"body":"As discussed in #82, this adds support for overriding relationship attributes using dot notation. It works for classname-named factories as well as shortnamed factories.\r\n\r\nGiven these factories:\r\n\r\n```php\r\n$factory('Acme\\User', 'user_with_role', [\r\n    'email' => $faker->email,\r\n    'password' => $faker->word,\r\n    'role_id' => 'factory:role',\r\n]);\r\n\r\n$factory('Acme\\Role', 'role', [\r\n    'display_name' => $faker->name,\r\n]);\r\n```\r\n\r\nYou can do this:\r\n\r\n```php\r\n$user = Factory::create('user_with_role', [\r\n    'email' => 'example@example.com',\r\n    'password' => 'my-secret-password',\r\n    'role.display_name' => 'role-name',\r\n]);\r\n```\r\n\r\nStill needs doc blocks, and likely can clean up how I'm filtering out the attributes. Disappointed array_filter doesn't pass keys :(\r\n\r\nWill comment when I think it's ready to be merged, happy to discuss what's here in the mean time."},"comment":{"url":"https://api.github.com/repos/laracasts/TestDummy/issues/comments/82666048","html_url":"https://github.com/laracasts/TestDummy/pull/83#issuecomment-82666048","issue_url":"https://api.github.com/repos/laracasts/TestDummy/issues/83","id":82666048,"user":{"login":"adamwathan","id":4323180,"avatar_url":"https://avatars.githubusercontent.com/u/4323180?v=3","gravatar_id":"","url":"https://api.github.com/users/adamwathan","html_url":"https://github.com/adamwathan","followers_url":"https://api.github.com/users/adamwathan/followers","following_url":"https://api.github.com/users/adamwathan/following{/other_user}","gists_url":"https://api.github.com/users/adamwathan/gists{/gist_id}","starred_url":"https://api.github.com/users/adamwathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamwathan/subscriptions","organizations_url":"https://api.github.com/users/adamwathan/orgs","repos_url":"https://api.github.com/users/adamwathan/repos","events_url":"https://api.github.com/users/adamwathan/events{/privacy}","received_events_url":"https://api.github.com/users/adamwathan/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T01:27:02Z","updated_at":"2015-03-18T01:27:02Z","body":"@devinfd Yeah just got excited and started trying that out and noticed the 5.6 requirement! Bah!"}}