Back

Laravel helpers:

Arr::divide()


The Arr::divide method returns two arrays: one containing the keys and the other containing the values of the given array:

use Illuminate\Support\Arr;

[$keys, $values] = Arr::divide(['name' => 'Desk']);

// $keys: ['name']

// $values: ['Desk']

52

0 / 1000