Answer the question
In order to leave comments, you need to log in
How to do strict whereIn filtering?
Good evening. Prompt how strictly to filter the data. That is, I have an array at the input, I need to get posts in which there is data on which I filter.
$recipes = Recipe::->whereHas('flavors', function ($query) use ($flavors_id) {
$query->whereIn('flavor_id', $flavors_ids);
})->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question