Showing 10 of 2,055 results.

Laravel Collection Public API: filter

filter(callable $callback = null) The filter method applies a filter to the collection. An optional $callback can be supplied to the filter method. If no $callback is supplied to the filter method, any value in the collection that evaluates to...

Resolving the Class Behind a Facade | Laravel 5 Facades

It is possible to quickly resolve the class behind a facade. Facades expose a public method getFacadeRoot which will return the instance of the underlying object the facade is forwarding method calls to. It is convenient that getFacadeRoot...

Laravel Miscellaneous Helper Function: tap

…ction is used to call a given Closure (provided as an argument to the $callback parameter) with the given $value . The tap helper function will return the reference to the original $value as its return value. This allows you to call any number of...

Compiling Custom Components

The default behavior of the compiler is to treat all custom component tags as if they were "normal" Blade component tags. However, we can provide custom compilers for our specific component tag prefixes and return custom-compiled output. We create...