Showing 10 of 2,055 results.

Laravel Collection Public API: pop

pop The pop method is used to retrieve the last item from the collection while also removing it from the collection. If there are no items in the collection, the pop method will return null . The following sample demonstrates the use of the pop...

Prettier 3 Plugin | Formatting

An Antlers formatter is provided as a Prettier 3 plugin. You will need to install and configure Prettier separately from the Antlers Toolbox Visual Studio extension. To install and enable the Antlers plugin for Prettier 3 make sure to install...

Laravel Collection Public API: max

max($key = null) The max method can be used to retrieve the maximum value of the given $key . By default, the $key is null and will function in a similar way to PHP's max function. The following code example highlights the usage of max without...

Laravel: Implementing a MD5 Hasher

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