whereNull

This commit is contained in:
邓皓元 2019-05-10 16:27:28 +08:00
parent 0dccbc380b
commit f83701b303

View File

@ -68,7 +68,7 @@ class CardService extends Service
break;
case 1:
$res = OrderCardPartition::selectRaw('DISTINCT(sim) sim, created_at')-whereNull('service_start_at')->whereHas('card', function ($relation) {
$res = OrderCardPartition::selectRaw('DISTINCT(sim) sim, created_at')->whereNull('service_start_at')->whereHas('card', function ($relation) {
$relation->whereNull('cancelled_at');
})->where('created_at', '>=', Carbon::now()->subMonths(6))->orderBy('created_at', 'desc')->paginate($limit);
break;