{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/18457","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/18457/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/18457/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/18457/events","html_url":"https://github.com/laravel/framework/pull/18457","id":216263929,"number":18457,"title":"[5.4] Create a static \"times\" method on the collection","user":{"login":"JosephSilber","id":1403741,"avatar_url":"https://avatars1.githubusercontent.com/u/1403741?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephSilber","html_url":"https://github.com/JosephSilber","followers_url":"https://api.github.com/users/JosephSilber/followers","following_url":"https://api.github.com/users/JosephSilber/following{/other_user}","gists_url":"https://api.github.com/users/JosephSilber/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephSilber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephSilber/subscriptions","organizations_url":"https://api.github.com/users/JosephSilber/orgs","repos_url":"https://api.github.com/users/JosephSilber/repos","events_url":"https://api.github.com/users/JosephSilber/events{/privacy}","received_events_url":"https://api.github.com/users/JosephSilber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-03-23T01:52:54Z","updated_at":"2017-03-24T18:13:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/18457","html_url":"https://github.com/laravel/framework/pull/18457","diff_url":"https://github.com/laravel/framework/pull/18457.diff","patch_url":"https://github.com/laravel/framework/pull/18457.patch"},"body":"This is extremely useful to whip up a quick list of stuff, whether in a test or in production:\r\n\r\n```php\r\n$slugs = Collection::times(5, function ($number) {\r\n    return 'slug-'.$number;\r\n});\r\n\r\n// ['slug-1', 'slug-2', 'slug-3', 'slug-4', 'slug-5'];\r\n```\r\n\r\nYou can also use it with factories, for example if you want sequential numbers:\r\n\r\n```php\r\n$products = Collection::times(5, function ($number) {\r\n    return factory(Product::class)->create(['name' => 'Product #'.$number]);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/289103679","html_url":"https://github.com/laravel/framework/pull/18457#issuecomment-289103679","issue_url":"https://api.github.com/repos/laravel/framework/issues/18457","id":289103679,"user":{"login":"JosephSilber","id":1403741,"avatar_url":"https://avatars1.githubusercontent.com/u/1403741?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephSilber","html_url":"https://github.com/JosephSilber","followers_url":"https://api.github.com/users/JosephSilber/followers","following_url":"https://api.github.com/users/JosephSilber/following{/other_user}","gists_url":"https://api.github.com/users/JosephSilber/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephSilber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephSilber/subscriptions","organizations_url":"https://api.github.com/users/JosephSilber/orgs","repos_url":"https://api.github.com/users/JosephSilber/repos","events_url":"https://api.github.com/users/JosephSilber/events{/privacy}","received_events_url":"https://api.github.com/users/JosephSilber/received_events","type":"User","site_admin":false},"created_at":"2017-03-24T18:13:44Z","updated_at":"2017-03-24T18:13:44Z","body":"@jmarcher makes sense. Added it :+1: "}}
{"actor":{"display_login":"JosephSilber"}}