Arr

25 results found
Posted on November 16, 2016

Arr::first

The Arr::first function returns the first element of an array passing a given truth test.

A default value may also be passed as the third parameter to the method. This value will be returned if no value passes the truth test:

$value = Arr::first($array, $callback, $default);
Read more