{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/16269","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/16269/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/16269/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/16269/events","html_url":"https://github.com/laravel/framework/issues/16269","id":187348979,"number":16269,"title":"FactoryBuilder::make() returns Eloquent Model instance when amount is 1","user":{"login":"dotZoki","id":247270,"avatar_url":"https://avatars.githubusercontent.com/u/247270?v=3","gravatar_id":"","url":"https://api.github.com/users/dotZoki","html_url":"https://github.com/dotZoki","followers_url":"https://api.github.com/users/dotZoki/followers","following_url":"https://api.github.com/users/dotZoki/following{/other_user}","gists_url":"https://api.github.com/users/dotZoki/gists{/gist_id}","starred_url":"https://api.github.com/users/dotZoki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotZoki/subscriptions","organizations_url":"https://api.github.com/users/dotZoki/orgs","repos_url":"https://api.github.com/users/dotZoki/repos","events_url":"https://api.github.com/users/dotZoki/events{/privacy}","received_events_url":"https://api.github.com/users/dotZoki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-04T14:35:04Z","updated_at":"2016-11-05T22:08:02Z","closed_at":null,"body":"- Laravel Version: 5.3.19\r\n- PHP Version: 7.0.8\r\n- Database Driver & Version: /\r\n\r\n### Description:\r\nFactoryBuilder::make() comment/description says \"Create a collection of models.\" I'm having a case where I choose random amount number (e.g. 0-5) and then loop through returned Collection. When amount is 1 it returns Eloquent Model instance and thus each is not working. Shouldn't it return Collection of 1 also? Wouldn't that be more consistent?\r\n\r\n### Steps To Reproduce:\r\nI used code like this:\r\n```\r\nfactory('App\\Client', 20)->create()->each(function($client) {\r\n    factory('App\\Contact', Faker\\Factory::create()->numberBetween(0, 5))->make()->each(function($contact) use($client) {\r\n        $client->contacts()->save($contact);\r\n    });\r\n});\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/258645506","html_url":"https://github.com/laravel/framework/issues/16269#issuecomment-258645506","issue_url":"https://api.github.com/repos/laravel/framework/issues/16269","id":258645506,"user":{"login":"dotZoki","id":247270,"avatar_url":"https://avatars.githubusercontent.com/u/247270?v=3","gravatar_id":"","url":"https://api.github.com/users/dotZoki","html_url":"https://github.com/dotZoki","followers_url":"https://api.github.com/users/dotZoki/followers","following_url":"https://api.github.com/users/dotZoki/following{/other_user}","gists_url":"https://api.github.com/users/dotZoki/gists{/gist_id}","starred_url":"https://api.github.com/users/dotZoki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotZoki/subscriptions","organizations_url":"https://api.github.com/users/dotZoki/orgs","repos_url":"https://api.github.com/users/dotZoki/repos","events_url":"https://api.github.com/users/dotZoki/events{/privacy}","received_events_url":"https://api.github.com/users/dotZoki/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T22:08:02Z","updated_at":"2016-11-05T22:08:02Z","body":"Not a bug, more of a wrong implementation. But I wonder will it be changed?"}}
{"actor":{"display_login":"dotZoki"}}