Showing 10 of 1,280 results.

Laravel Collection Static API: make

make($items = []) The make static method creates a new instance of a collection with the provided $items (assuming that the provided $items is in itself not an instance of Collection ). The following code sample highlights the usage of the make...

Laravel Artisan Tinker: The history Command

The history command can be used to retrieve information about the commands have been previously entered in the Tinker REPL session. By using its various options, you can quickly search and find any history item, replay it and even save it to a...

Laravel Array Helper Function: array_except

The except helper method will return all the key/value pairs of the $array where the keys in the original array are not in the $keys array. The signature for the except helper method is: except($array, $keys) Assuming that the $_POST super-global...

Laravel Artisan General Command: The config:cache Command

The config:cache command can be used to create a cache file for the applications configuration files. This cache file will improve the performance when loading the configuration values. This command will first clear any existing configuration...

Laravel Application Helper: auth

auth($guard = null) Used without supplying any arguments for $guard , the auth helper function is an alternative to using the Auth facade. With no arguments, the auth function returns an instance of Illuminate\Contracts\Auth\Factory (which by...

Laravel Collection Public API: zip

zip($items) The zip method is used to merge the values of the $items array with the values within the Collection at the corresponding index. The zip method produces results that are similar to Python's zip function, and developer's coming from a...

Laravel 5: Triggering Events With event

The event helper function is a convenient way to dispatch a particular $event to its listeners. An optional $payload of data can also be supplied when dispatching the event. When the event is dispatched, all its listeners will be called and any...

Laravel String Helper Function: starts_with

startsWith does the opposite of ends_with , and has the same rules of use. Instead of checking if a given $haystack ends with any of the supplied $needles , startsWith checks if a given $haystack starts with any of the $needles . The signature for...

Laravel Collection Public API: only

only($keys) The only method is the logical opposite of the except method. The only method is used to return all the key/value pairs in the collection where the keys in the collection are in the supplied $keys array. Internally, this method makes a...

Filter Search