1WHERE age < 6 OR (age > 8 AND name IN ('Jane', 'Jerry'))
2
3return \App\Dogs::select('name', 'age')
4 ->where('age','<', 6)
5 ->orWhere(function($q){
6 $q->where('age','>', 8);
7 $q->whereIn('name', ['Jane', 'Jerry']);
8 })
9 ->get();