how to join in laravel on a select result with eloquent? - development

how to join in laravel on a select result with eloquent?

I want to join on a result of other select like this :

SELECT *
  FROM TABLE1
  JOIN (
  SELECT cat_id FROM TABLE2 where brand_id = 2 GROUP BY TABLE2.cat_id) AS b ON TABLE1.id = b.cat_id

is there any way to do this with eloquent?



from Laravel Questions and Answers https://laravelquestions.com/laravel/how-to-join-in-laravel-on-a-select-result-with-eloquent/
via Lzo Media

Comments

Popular posts from this blog

ng-include of inline SVG does not display gradient except in Chrome

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-show doesn’t work correct with value boolean