Laravel 5 Collections Static API: Creating a Collection By Invoking a Callback a Given Number of Times With times
…allow you to invoke the callback function the specified number of times when the collection is initialized. The callback function will receive the one-based index of the current iteration as its first argument. The callback function is allowed to...