Showing 10 of 1,278 results.

Laravel Collection Public API: put

put($key, $value) The put method is used to add a new item to the collection with a given $key and $value . The put method modifies the original Collection instance and returns a reference to it. The following code example will highlight the usage...

Laravel Collection Public API: map

map(callable $callback) The map method applies a given $callback to each item in the collection. The $callback can modify the item which will be added to a new collection. The map method does not modify the original collection, but returns a new...

Laravel String Helper Function: quick_random

The quickRandom helper method is similar to random in that it generates a random string to a given $length . The quickRandom helper method does not rely on the OpenSSL extension, and generates its random strings from a pool of alpha-numeric...

Laravel Collection Public API: take

take($limit) The take method is a useful method that will return a number of items (up to the provided $limit ) from the collection. If the $limit is negative, it will return a number of items (up to the provided $limit ) from the end of the...

Laravel Artisan Queue Command: The queue:failed Command

The queue:failed command is a simple command that will list all of the queue jobs that have failed. The data for the generated table comes from the failed_jobs database table. This command defines no parameters or options and can be used like so:...

Laravel String Helper Function: singular

The singular helper method is the logical opposite to the plural method: it will attempt to take a given $value and return the singular form of that word. The internal mechanisms are similar to the plural method. The signature for the singular...

Laravel 5: Accessing and Manipulating Session Data With session

The session function can be used to resolve the \Illuminate\Session\SessionManager instance from the service container, retrieve session values, and even set new session values. These different behaviors are controlled by the types, and number, of...

Filter Search