Sunday, March 5, 2017

Group by laravel eloquent

Hi All please i want to make this query to be eloquent but i dont know how to make it

i want to use count with Group By and order by count DEsc

->groupBy('room_id')->get();

but i can not

here it is my original query

 SELECT * , count(seeker_id) FROM `jobs_skills` WHERE ( skill_id =2 OR skill_id =3 OR skill_id=5) group by seeker_id ORDER BY count(seeker_id) DESC

i spent alot of time to solve it but i can't do it

please help me



via John Tadros

Advertisement