📅  最后修改于: 2022-03-11 14:54:13.630000             🧑  作者: Mango
// ...
$q->where(function ($query) {
$query->where('gender', 'Male')
->where('age', '>=', 18);
})->orWhere(function($query) {
$query->where('gender', 'Female')
->where('age', '>=', 65);
})