Showing 7 of 1,975 result(s)
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 demonstrates how...
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...
The concat method will create a new collection by combining the values of the collection instance is called on with the provided $source . It is important to note that the source must implement the Traversable interface. The concat method does not...
The when method will execute the provided $callback on the collection if the provided boolean $value evaluates to true . A $default callback may also be supplied if the provided $value evaluates to false . Both of the provided callbacks will...
We can use the mapSpread method to replicate the behavior of LINQ's Zip operator that was added in version 4 of the .NET Framework. LINQ's Zip operator enumerates two collections and allows a new collection to be created by executing a function...
…g a new file with the name of the HTTP status code. To override the 500 Server Error page we can create a new file named 500.html . You may have noticed that we did not use the .antlers.html or the .blade.html extension. The reason for this is...
…ed document, the transformation step is reversed, and the resulting template is parsed again. The resulting nodes are then used in the following compilation phase., If compiler extensions are available, the process from step two essentially...