From 171eb63b9aecfc96a700ca287b3c84532ac54c29 Mon Sep 17 00:00:00 2001 From: corbpie Date: Tue, 15 Aug 2023 19:04:56 +1000 Subject: [PATCH] Update Pricing.php Updated allPricing() to only be for active services, changed its cache name so this will instantly populate and work --- app/Models/Pricing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Pricing.php b/app/Models/Pricing.php index 254a89a..c845728 100644 --- a/app/Models/Pricing.php +++ b/app/Models/Pricing.php @@ -143,8 +143,8 @@ class Pricing extends Model public static function allPricing() { - return Cache::remember('all_pricing', now()->addWeek(1), function () { - return Pricing::get(); + return Cache::remember('all_active_pricing', now()->addWeek(1), function () { + return Pricing::where('active', 1)->get(); }); }