I need to use multiple WhereIn
Clauses with OR
in a query.. So I was doing it something like below... It is not working and I am getting an empty result
orWhereIn('cat', $array)
orWhereIn('cat_a', $array)
orWhereIn('child_a', $array)
is it possible? .. I have looked over the internet for solution but could find anything
I am using Laravel 4.2 .. thanks in advance
My Full Query
Note: if I use single whereIn
clause.. it works absolutely fine..
$query = Product::query();
$query->orWhereIn('category_id', $ids);
$query->orWhereIn('category_id_2', $ids);
$query->orWhereIn('category_id_3', $ids);
$query->orderBy('price_for_sorting', 'ASC');
$products = $query->paginate(15);