Showing 10 of 1,278 results.

Laravel Artisan Session Table: The session:table Command

The session:table command is used to create a new migration for the sessions database table. This table is required to use the database session driver. This command defines no parameters and can be used like so: 1 php artisan session:table The...

Laravel Artisan Generator Command: The make:request Command

The make:request command can be used to generate new request validation request classes. The command accepts a name for the newly created request class. The name will be used as the name of the class and the file. The following example...

Laravel 5 String Helpers: ends_with global helper

The endsWith is used to check if a given $haystack ends with any of the supplied $needles . The $haystack is any value that can be cast into a string, and $needles is any value that can be cast into an array. If the $haystack ends with any of the...

Laravel Array Helper Function: array_pluck

pluck($array, $value, $key = null) The pluck helper method is used to retrieve a list of specific values from a given $array . It is most useful when used against arrays of objects, but will also work with arrays just as well. Let's use the...

Laravel Array Helper Function: array_where

where($array, callable $callback) The where helper method is functionally similar to the pluck method, in that both take a source $array and filter it to produce a smaller array. It works by iterating over each element in the $array and executing...

Laravel String Helper Function: random

The random helper method generates a random string of the specified $length . This method internally uses the OpenSSL function openssl_random_pseudo_bytes , and therefore requires the OpenSSL extension to be installed and configured . The...

Filter Search