Showing 10 of 2,055 results.

Laravel 5: Creating Combinations of Elements With crossJoin

The crossJoin method can be used to combine the input arrays; the resulting array will contain all of the possible combinations of the input array values.The signature of the crossJoin method is: 1 public static function crossJoin ( 2 ... $ arrays...

An Introduction to Laravel's Artisan Console

…h --seed --seeder Resets and run all migrations again. migrate:reset --database --force --pretend Rollback all database migrations. migrate:rollback --database --force --pretend Rollback the last database migration. migrate:status --database...

Laravel Artisan Route Command: The route:list Command

The route:list command can be used to show a list of all the registered routes for the application. This command will display the domain, method, URI, name, action and middleware for the routes it includes in the generated table. The following...

Laravel Collection Public API: flatten

flatten The flatten method will return a new Collection instance representing a flattened version of the original collection's items. The flatten method internally makes use of the Illuminate\Support\Arr::flatten($array) helper method. The flatten...

Laravel Collection Public API: all

all The all method can be used to retrieve the underlying array that the collection is using to hold its data. The following code demonstrates the usage of the all method: 1 <?php 2 3 use Illuminate \ Support \ Collection ; 4 5 $ items = [ 6 '...