eloquent复合条件
2017-12-10 本文已影响0人
锋峰巅巅
- where a and (b or c)
$abc = Apps::where('id',1)->where(
function($q){
$q->where('name','ss')->orWhereIn('type', [1, 2]);
})->first();
$abc = Apps::where('id',1)->where(
function($q){
$q->where('name','ss')->orWhereIn('type', [1, 2]);
})->first();