Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GTHell's avatar

Eloquent or query builder?

Which should I go with if I build a landing website. It also has video and the content need to be dynamic. I think the wordpress is best for this the customer don't want that because he think the security is bad.

There was a man asking me to improve his site but I fail to import his postgress. When I take a look at his laravel project, I notice that the man use 0 eloquent, no MVC just VC, and the DB is quiet big because it's a CRM and the project is big so that kinda got me into this kind of thinking on which is better, Eloquent or query builder?

0 likes
2 replies
tisuchi's avatar

Honestly it depends on the types of query. How many data you need to fetch and so on.

Of course, in general, eloquent is better because you can get lot of the things out of the box. On the other hand, query builder is also useful when you need more and more complex query to do operation in database.

My suggestion is to follow both, depends upon your need.

1 like
GTHell's avatar

What do you think is best for my describe project? I think the code first with eloquent is much more suitable but more answer would be really appreciated.

Please or to participate in this conversation.