Skip to content
Advertisement

Laravel equivalent of ->fetch?

I am working on a website that uses PHP and SQL to connect to the database, I’m trying to replace all the SQL with Laravel Query Builder commands.

I am running into a problem with the following code:

JavaScript

I can easily connect to the database using Laravel, however I am not sure how to continue after the code shown below:

JavaScript

TLDR: In PHP/PDO Fetch fetches the next row from a result set, I’m curious if Laravel has an easy way to do the same.

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement