Skip to content
Advertisement

Tag: laravel-query-builder

Select from select using Laravel eloquent

I want to get all user’s favourite products. The query should be like this: How can I query with eloquent? Answer You’re trying to achieve something like this: In the oficial documentation you can find the explanation of Advanced where clauses The final result will be (you can see this dumping the query using toSql() method instead of get()) :

Advertisement