rydurham liked a comment+100 XP
3mos ago
Eloquent results as array instead of object
Try some think like this
$query = DB::connection()->getPdo()->query("select * from users");
$data = $query->fetchAll(PDO::FETCH_ASSOC);
dd($data);
And for next row set
$array = [];
$query = DB::connection()->getPdo()->query("select * from users");
do {
$data = $query->fetchAll(PDO::FETCH_ASSOC);
if ($data) {
array_push($array, $data);
}
} while ($pdoData->nextRowset());