Skip to content
Advertisement

How can I write this query with Eloquent

Let’s say I have a method like this:

JavaScript

My question is, how can I rewrite this query with Eloquent for my Laravel project?

Advertisement

Answer

From what I understood I think this is what you are looking for, try it and tell me:

JavaScript

You can get more information from the laravel Database documentation Query Builder here:

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