laravel - Using count in an eloquent query -


$data = user::where(function($q){         $q->where(user::wherein('access', array(1,2,3,4))->count(), 4);     })->get(); 

i want users have access of 1,2,3,4 (used illustrative purposes passed in array).

i getting users count of in query equals 4.

how can done in eloquent? above code errors, trying select users 4 = 4.

where going wrong?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -