Arrayable::toArray()

array toArray() Get the instance as an array. Return Value array

Arrayable

Arrayable interface Arrayable (View source) Methods array toArray() Get the instance as an array.

Arr::__callStatic()

static mixed __callStatic(string $method, array $parameters) Dynamically handle calls to the class. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException

Arr::__call()

mixed __call(string $method, array $parameters) Dynamically handle calls to the class. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException

Arr::where()

static array where(array $array, callable $callback) Filter the array using the given callback. Parameters array $array callable $callback Return Value array

Arr::sortRecursive()

static array sortRecursive(array $array) Recursively sort an array by keys and values. Parameters array $array Return Value array

Arr::sort()

static array sort(array $array, callable|string $callback) Sort the array using the given callback or "dot" notation. Parameters array $array callable|string $callback Return Value array

Arr::set()

static array set(array $array, string $key, mixed $value) Set an array item to a given value using "dot" notation. If no key is given to the method, the entire array will be replaced. Parameters array $array string $key mixed $value Return Value array

Arr::pull()

static mixed pull(array $array, string $key, mixed $default = null) Get a value from the array, and remove it. Parameters array $array string $key mixed $default Return Value mixed

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