Showing 10 of 1,280 results.

Laravel Artisan Generator Command: The make:provider Command

The make:provider command can be used to quickly create new service providers for your application. It accepts only the name to be used for the newly generated service provider class and file. Newly generated providers are stored in the...

Laravel Artisan Queue Command: The queue:restart Command

The queue:restart command can be used to indicate to all daemon queue workers that they should restart. This command simply instructs the queue works to restart after they are done working on their current job. This command defines no options or...

Laravel Helper Function: env

env($key, $default = null) The env function can be used to get an environment variables value. If an environment value with the given $key exists, its value will be returned. If the given $key does not exist, the $default value will be returned...

Laravel 5: Sorting Arrays With sort

The sort helper method will allow you to sort the given $array based on some condition returned by the $callback . The method works by iterating over all the values in the $array and passing the values it finds into the $callback function. It then...

Laravel Application Helper Function: back

back($status = 302, $headers = []) The back helper function is used to create a redirect response to the user's previous location. It defines two parameters which can be used to control the status code and headers of the response. An integer...

Laravel Collection Public API: chunk

chunk($size, $preserveKeys = false) The chunk method is useful when working with large collections in that it allows developers to create smaller collections to work with. The chunk method defines two parameters: $size , which is used to control...

Laravel Collection Public API: keyBy

keyBy($keyBy) The keyBy method is used to create a new Collection instance where the keys of the new key/value pairs are determined by a $keyBy callback function (a string value can also be supplied instead of a function). The signature of the...