Update Pricing.php

Updated allPricing() to only be for active services, changed its cache name so this will instantly populate and work
This commit is contained in:
corbpie 2023-08-15 19:04:56 +10:00 committed by GitHub
parent 0aeb38d516
commit 171eb63b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
});
}