Answers for "laravel get query result as array"

PHP
1

laravel query builder get data as array of array

$array = get_object_vars($result);
Posted by: Guest on March-15-2021
1

laravel query builder get data as array of array

$array = json_decode(json_encode($result), true);
Posted by: Guest on March-15-2021
0

laravel get query result as array

$result = array_map(function ($value) {
    return (array)$value;
}, $result);
Posted by: Guest on July-01-2020

Code answers related to "laravel get query result as array"

Browse Popular Code Answers by Language