Search

Showing 7 of 1,216 result(s)

/blog/2016/11/21/laravel-router-helper-function-put

put($uri, $action) The put function is a shortcut to registering a route with the router that responds to the PUT 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 route...

/blog/2016/11/21/laravel-router-helper-function-resource

resource($name, $controller, array $options = []) The resource function is a shortcut that is used to register a resource controller with the router. It accepts the $name of the route to create, the name of the $controller and an array of $options...

/blog/2016/11/21/laravel-url-helper-function-elixir

elixir($file, $buildDirectory = 'build') The elixir helper function can be used to get the path to a versioned Elixir file. The function accepts two arguments, the name of the $file to find the path for and the $buildDirectory to look in. By...

/blog/2016/11/29/laravel-collection-public-api-all

all The all method can be used to retrieve the underlying array that the collection is using to hold its data. The following code demonstrates the usage of the all method: After the above code has been executed, the $returnedItems variable would...

/blog/2016/11/29/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...

/blog/2016/11/29/laravel-collection-public-api-collapse

collapse The collapse method combines all the first-level items of a collection into a new, single collection. The returned value of the collapse method is an instance of the Collection class. We will create a simple collection to work with like...

/blog/2016/11/29/laravel-collection-public-api-contains

contains($key, $value = null) The contains method is used to determine if a given $key exists within the collection. Additionally, an option $value can be specified that will be used to check if a given key/value pair exists within the collection....