Showing 10 of 1,280 results.

Laravel Collection Public API: flatMap

flatMap(callable $callback) The flatMap method is used in the same way as the map (discussed in the Laravel Collection Public API: map article) method but will collapse the resulting collection. The following two code examples are equivalent: 1...

Laravel 5: The Translator's File Loader

…et token is invalid. ' , 12 ' sent ' => ' We have e-mailed your password reset link! ' , 13 ' reset ' => ' Your password has been reset! ' , 14 15 ] ; The individual PHP files containing the translation lines are referred to as "groups". For a...

Laravel Array Helper Function: array_set

set(&$array, $key, $value) The set helper method is the logical opposite of the forget (discussed in the Laravel Array Helper Function: array_forget article) method. its purpose is to set values within an array. The set method also uses dot...

Laravel Artisan General Command: The tinker Command

The tinker command can be used to start an interactive language shell for interacting with your Laravel framework application. The tinker command defines an optional array input include . Traditionally this is used to include auto-loaders for...

Laravel Collection Public API: whereLoose

…t the given $key has some value equal to the provided $value . The whereLoose method does not check to make sure the item's value and the provided $value have the same data type. This is the fundamental difference between the where (discussed in...

Laravel Artisan Tinker: The optimize Command

The optimize command optimizes various aspects to improve the performance of the Laravel application. The command provides two flags. The --force flag can be set to indicate that the compiled class file should be written (by default the compiled...

Laravel Artisan Tinker: The dump Command

…l error: Class 'User' not found in eval()'d code on line 1 2 >>> $user = new App\User; 3 => App\User {#651} 4 >>> dump $user 5 App\User {#651} 6 >>> It also import to note that since the Tinker REPL is responding to commands within the context...

Laravel String Helper Function: parse_callback

The parseCallback helper method is a fairly simple method, even though it serves a somewhat specialized purpose. The following syntax for class names and method names can be found utilized throughout the Laravel framework: 1 ClassName @...