Search

Showing 7 of 1,975 result(s)

/blog/2018/04/22/laravel-5-collections-removing-a-portion-of-a-collection-with-splice

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...

/blog/2018/04/14/laravel-5-managing-http-cookies-with-cookie

…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...

/blog/2016/11/30/laravel-available-hashing-methods

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...

/blog/2018/04/11/laravel-5-sorting-arrays-with-sort#content-example-use

…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)...

/blog/2018/04/15/laravel-5-execute-a-callback-on-a-given-value-while-chaining-the-original-value-with-tap#content-example-use

…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...

/blog/2018/04/22/laravel-5-collections-filtering-collection-elements-with-where

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...

/blog/2018/02/20/laravel-5-string-translation-public-api#content-example-use-3

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...