📅  最后修改于: 2022-03-11 14:54:20.035000             🧑  作者: Mango
WHERE age < 6 OR (age > 8 AND name IN ('Jane', 'Jerry'))
return \App\Dogs::select('name', 'age')
->where('age','<', 6)
->orWhere(function($q){
$q->where('age','>', 8);
$q->whereIn('name', ['Jane', 'Jerry']);
})
->get();