From e100203331f8989ffc9c00151e9bb8d595b12e06 Mon Sep 17 00:00:00 2001 From: cp6 Date: Fri, 18 Aug 2023 19:28:53 +1000 Subject: [PATCH] Updated counts to use Eloquent --- app/Models/DNS.php | 2 +- app/Models/Labels.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/DNS.php b/app/Models/DNS.php index ac52e82..465511d 100644 --- a/app/Models/DNS.php +++ b/app/Models/DNS.php @@ -22,7 +22,7 @@ class DNS extends Model public static function dnsCount() { return Cache::remember('dns_count', now()->addMonth(1), function () { - return DB::table('d_n_s')->count(); + return DNS::count(); }); } diff --git a/app/Models/Labels.php b/app/Models/Labels.php index 0e98598..d83f91c 100644 --- a/app/Models/Labels.php +++ b/app/Models/Labels.php @@ -41,7 +41,7 @@ class Labels extends Model public static function labelsCount() { return Cache::remember('labels_count', now()->addMonth(1), function () { - return DB::table('labels')->count(); + return Labels::count(); }); }