When I execute the PDO statement, the internal result set is saved, and I can use ->fetch()to get the string from the result.
If I wanted to convert the whole result into an array, I could do it ->fetchAll().
With Laravel's Query Builder Docs , I only see a way to get the result of an array from executing a query.
$scores = DB::table("highscores")
->select("player_id", "score")
->orderBy("score", "desc")
->get();
var_dump($scores);
Is there a way to get a result set from Query Builder like PDO? Or am I forced to wait for Query Builder to build an entire array before it returns a value?
Perhaps something like ->lazyGet()or ->getCursor()?
, , Query Builder . , 30 000 . PDO , ->fetch() , .
Laravel Query Builder ? " , ? , 30 000 !"
PS , , ->skip() ->take() . , 30 000 . , , PHP .