WHERE age < 6 OR (age > 8 AND name IN ('Jane', 'Jerry'))
return AppDogs::select('name', 'age')
->where('age','<', 6)
->orWhere(function($q){
$q->where('age','>', 8);
$q->whereIn('name', ['Jane', 'Jerry']);
})
->get();