From 7bedade8764dd265c612a3eb4f4f47a307218774 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sat, 19 Nov 2022 20:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20Active=20Scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Host.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Host.php b/app/Models/Host.php index 9deef4e..c20db38 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -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)