eloquent
->where('company_id', $companyId)
->where(function ($q){
$q->whereIn('status', ['ongoing', 'partially'])
->whereIn('type', ['dine']); //테이블 겔제대기 or 부분결제
})->orWhere(function($q){
$q->whereIn('status', ['hold'])
->whereIn('type', ['takeout']); //보류
})
->orderBy('created_at', 'desc');
mysql
// where ((status='onging' or status='partially') and type='dind')
// or ((status='hold') and type='takeout')
카테고리 없음
댓글