Arr
Array helper
class Winter\Storm\Support\Arr
extends Illuminate\Support\Arr
Extends
Class | Description |
---|---|
Illuminate\Support\Arr
|
Methods
public static build (array $array, callable $callback) : array
Build a new array using a callback.
Parameters
Property | Type | Description |
---|---|---|
$array | array |
array
|
$callback | callable |
callable
|
Returns
array
public static moveKeyToIndex (array $array, string | integer $targetKey, integer $index) : array
Moves the key to the index within the array, negative index will work backwards from the end of the array
Parameters
Property | Type | Description |
---|---|---|
$array | array |
array
|
$targetKey | string | integer |
string | integer
|
$index | integer |
integer
|
Returns
array
Copyright © 2024 Winter CMS