Showing 7 of 1,975 result(s)
…"Laravel Artisan: An In Depth Coverage of Laravel Features". It was meant to be a comprehensive guide to the Laravel framework. At the point where it became obvious the plug had to be pulled on the project, it weighed in at around 506 pages....
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...
reduce(callable $callback, $initial = null) The reduce method is to reduce a collection into only one item. It does this by iterating over the collection and applying the $callback function on each item. The $callback function should define two...
In this article we will create an implementation of Illuminate\Contracts\Hashing\Hasher using PHP's crypt function and the CRYPT_MD5 hashing function. Like in the previous sections, we will examine each method before looking at the full...
For the next example, we will create a new file at resources/lang/es.json to both showcase literal based language files as well as how the $locale parameter can be used. Note: with JSON based language files, there is only one file per locale...
In version 5.4, Laravel added the concept of "macro mixins": a way to define and group related macro methods and utility functions into a class and then inject, or mix in all of the class methods as macro methods to any class that utilizes the...
…amespaces and labels, we will create another Artisan command to help invalidate our cache whenever we want. In app/HybridCache/Commands/InvalidateLabel.php : Like before, we will need to update our cache's service provider to make our command...