diff --git a/app/Models/ClaimMailTemplate.php b/app/Models/ClaimMailTemplate.php index 8393ead..c461d3b 100644 --- a/app/Models/ClaimMailTemplate.php +++ b/app/Models/ClaimMailTemplate.php @@ -29,6 +29,24 @@ class ClaimMailTemplate extends Model 'brand_id', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ + protected static function booted(): void + { + static::created(function () { + self::resetCache(); + }); + static::updated(function () { + self::resetCache(); + }); + static::deleted(function () { + self::resetCache(); + }); + } + // * METHODS /** diff --git a/app/Models/ClaimSubject.php b/app/Models/ClaimSubject.php index 6b38d68..70e2f89 100644 --- a/app/Models/ClaimSubject.php +++ b/app/Models/ClaimSubject.php @@ -27,6 +27,24 @@ class ClaimSubject extends Model 'brand_id', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ + protected static function booted(): void + { + static::created(function () { + self::resetCache(); + }); + static::updated(function () { + self::resetCache(); + }); + static::deleted(function () { + self::resetCache(); + }); + } + // * METHODS /**