public static function bootCacheableEloquent(): void
    {
        static::updated(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });

        static::created(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });

        static::deleted(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });
    }
public static function bootCacheableEloquent(): void
    {
        static::updated(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });

        static::created(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });

        static::deleted(function (Model $cachedModel) {
            ! $cachedModel->isCacheClearEnabled() || $cachedModel::forgetCache();
        });
    }
public static function bootCacheableEloquent ( ) : void { static :: updated ( function ( Model $ cachedModel ) { ! $ cachedModel -> isCacheClearEnabled ( ) || $ cachedModel :: forgetCache ( ) ; } ) ; static :: created ( function ( Model $ cachedModel ) { ! $ cachedModel -> isCacheClearEnabled ( ) || $ cachedModel :: forgetCache ( ) ; } ) ; static :: deleted ( function ( Model $ cachedModel ) { ! $ cachedModel -> isCacheClearEnabled ( ) || $ cachedModel :: forgetCache ( ) ; } ) ; }
Boot the cacheable eloquent trait for a model.

@return void
Boot the cacheable eloquent trait for a model .