laravel query field array of values code example
Example: laravel get query result as array
$result = array_map(function ($value) {
return (array)$value;
}, $result);
$result = array_map(function ($value) {
return (array)$value;
}, $result);