Answer the question
In order to leave comments, you need to log in
Is it possible to pass an array of conditions to whereIn in eloquent?
Good afternoon! Can you please tell me how can I pass an array to whereIn?
For a regular where, you can do this:
$conditions = array(
array('email', '=', '[email protected]'),
array('status', '=', 'active'),
);
$result = DB::table('users')->where($conditions)->get();
Answer the question
In order to leave comments, you need to log in
I don't really understand what you need, but MB like this:
\DB::table('users')->where('status', '=', 'active')->whereIn('email', $emails)->get();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question