laravel query result as array 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);