'object' ]; /** * The attributes that should be cast to Enums. * * @var array */ protected $enumCasts = [ 'type' => GeneralConfigType::class ]; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'type', 'data' ]; /** * Perform any actions required after the model boots. * * @return void */ protected static function booted() { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass static::created(function (self $config) { Cache::delete('GeneralConfigGlobal'); }); // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass static::updated(function (self $config) { Cache::delete('GeneralConfigGlobal'); }); // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass static::deleted(function (self $config) { Cache::delete('GeneralConfigGlobal'); }); } }