protected static function bootTaggable(): void
    {
        static::deleting(function ($model) {
            if (!method_exists($model, 'runSoftDelete') || $model->isForceDeleting()) {
                $model->detag();
            }
        });
    }
protected static function bootTaggable(): void
    {
        static::deleting(function ($model) {
            if (!method_exists($model, 'runSoftDelete') || $model->isForceDeleting()) {
                $model->detag();
            }
        });
    }
protected static function bootTaggable ( ) : void { static :: deleting ( function ( $ model ) { if ( ! method_exists ( $ model , 'runSoftDelete' ) || $ model -> isForceDeleting ( ) ) { $ model -> detag ( ) ; } } ) ; }
Boot the trait.

Listen for the deleting event of a model, then remove the relation between it and tags
Boot the trait .