2017-01-31 2 views

ответ

2

Для AND использования:

$query->whereHas($key,function($q) use($option){ 
     $q->whereIn('district', $option) 
      ->whereIn('region', $option); 
    }); 

Для OR:

$query->whereHas($key,function($q) use($option){ 
     $q->whereIn('district', $option) 
      ->orWhereIn('region', $option); 
    });