改进 Active Scope

This commit is contained in:
iVampireSP.com 2022-11-19 20:21:56 +08:00
parent bcc49864af
commit 7bedade876
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -121,7 +121,7 @@ public function workOrders(): HasManyAlias
public function scopeActive($query)
{
return $query->whereIn('status', ['running', 'stopped'])->where('price', '!=', 0)->where('managed_price', '!=', 0);
return $query->whereIn('status', ['running', 'stopped'])->where('price', '!=', 0)->where('managed_price', '!=', 0)->whereNotNull('managed_price');
}
public function scopeThisUser($query, $module = null)