Showing 7 of 1,975 result(s)
The splice method is a useful method; it is often used to remove a portion of a collection and return the removed section. It defines three parameters: $offset , $length and $replacement . The $offset tells the splice method where to begin when...
…an implementation of "\Illuminate\Contracts\Cookie\Factory" (which is an instance of "\Illuminate\Cookie\CookieJar" by default) is returned instead. When not being used to return a CookieJar instance, the cookie function makes a call to the make...
Even though Laravel only provides a Illuminate\Contracts\Hashing\Hasher implementation for the bcrypt function, there are many more hashing functions that are available to developers. The following functions are available through the use of PHP's...
…would look like this: A> ## Array Sort Considerations The array_sort function internally creates a new instance of the "\Illuminate\Support\Collection" class with the given $array and then calls the collection's sortBy(callable $callback = null)...
…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...
The where method allows developers to filter a collection given a key value pair. It filters the collection's items by checking that the given $key has some value equal to the provided $value . An argument can be supplied for the $operator...
The following code examples will demonstrate the usage of the has method. The results of method call will appear above the method call as a comment. Line 11 in the above code examples could possible seem confusing at first. The method call returns...