Showing 10 of 1,280 results.

Laravel Collection Public API: forget

forget($key) The forget method removes an item from the collection based on given $key . The forget method returns a reference to the original collection, meaning it modifies the collection instance it was called on. The following code example...

Laravel Router Helper Function: patch

patch($uri, $action) The patch function is a shortcut to registering a route with the router that responds to the PATCH HTTP verb. The $uri is the URI of the route, such as / or login . The $action is what will be executed by the router when the...

Laravel 5.5 String Helper Function: after

The after method can be used to return a part of a string after the first occurrence of a $search character. This method can be used to help parse URL query strings, or to quickly find substrings based on a certain character.The signature of the...

Laravel Helper Function: session

session($key = null, $default = null) The session function is a versatile function. It can be used to return the \Illuminate\Session \SessionManager instance, to set session values and to retrieve session values.

Laravel Artisan Tinker: The migrate Command

The migrate command is used to run migrations against the database. It provides many different options and flags (six in total). The following table lists and explains each of these options and flags. Option/Flag Description Default Value...

Laravel Array Helper Function: array_divide

The divide helper method will take the given $array and create two new arrays. The first array will be all of the keys from the original $array and the second array will be all of the values. 1 <?php 2 3 use Illuminate \ Support \ Arr ; 4 5 $...

Laravel Collection Public API: toArray

toArray The toArray method is similar to the all method in that it will return the underlying array that the collection instance is using. The difference, however, is that the toArray method will convert any object instance it can into arrays...

Laravel Artisan Migration Command: The migrate:install Command

The migrate:install command is used to create the migrations database table. It defines only one optional parameter database . The database option can be used to specify the database connection to use when running the migrations. By default this...

Filter Search