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
Post a Comment