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

java - How to specify maven bin in eclipse maven plugin? -

Error while updating a record in APEX screen -

single sign on - Logging into Plone site with credentials passed through HTTP -