@truetaurus Yes. It’s called Eloquent.
Eloquent uses the query builder under the hood. Anything you can do with the query builder, you can do with Eloquent. Except that you’ll get instances of your Eloquent model back in result collections.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Using database query builder (https://laravel.com/docs/5.5/queries) get() returns me a collection of StdClass. I am using a postgresql database.
Is it possible somehow to create objects from my tables and then return a collection of objects? i.e. convert the stdClass to the specific Object representing the table? Maybe a different library? I would rather not create my own class to convert these stdObjects to objects
Please or to participate in this conversation.