I'm making a products search by filters:
My code:
->where(function($query) use($filter)
{
if(!empty($filter)){
foreach ($filter as $key => $value) {
$f = explode(",", $value);
$query-> whereIn('products.value', $f);
}
}
})
Query:
and (products.value in (Bomann, PHILIPS) and products.value in (red,white))
But I need:
and (products.value in (Bomann, PHILIPS) OR products.value in (red,white))
Is there something similar in Laravel:
orWhereIn
orWhereIn
. dude, you should have given it a try 1st. – Slain