Arr::prepend()

static array prepend(array $array, mixed $value, mixed $key = null) Push an item onto the beginning of an array. Parameters array $array mixed $value mixed $key Return Value array

Arr::pluck()

static array pluck(array $array, string|array $value, string|array|null $key = null) Pluck an array of values from an array. Parameters array $array string|array $value string|array|null $key Return Value array

Arr::hasMacro()

static bool hasMacro(string $name) Checks if macro is registered. Parameters string $name Return Value bool

Arr::has()

static bool has(ArrayAccess|array $array, string|array $keys) Check if an item or items exist in an array using "dot" notation. Parameters ArrayAccess|array $array string|array $keys Return Value bool

Arr::get()

static mixed get(ArrayAccess|array $array, string $key, mixed $default = null) Get an item from an array using "dot" notation. Parameters ArrayAccess|array $array string $key mixed $default Return Value mixed

Arr::isAssoc()

static bool isAssoc(array $array) Determines if an array is associative. An array is "associative" if it doesn't have sequential numerical keys beginning with zero. Parameters array $array Return Value bool

Arr::macro()

static void macro(string $name, callable $macro) Register a custom macro. Parameters string $name callable $macro Return Value void

Arr::last()

static mixed last(array $array, callable $callback = null, mixed $default = null) Return the last element in an array passing a given truth test. Parameters array $array callable $callback mixed $default Return Value mixed

Arr::forget()

static void forget(array $array, array|string $keys) Remove one or many array items from a given array using "dot" notation. Parameters array $array array|string $keys Return Value void

Arr::first()

static mixed first(array $array, callable $callback = null, mixed $default = null) Return the first element in an array passing a given truth test. Parameters array $array callable $callback mixed $default Return Value mixed