public static function bootTaggable()
    {
        static::created(function (Model $taggableModel) {
            if ($taggableModel->queuedTags) {
                $taggableModel->tag($taggableModel->queuedTags);

                $taggableModel->queuedTags = [];
            }
        });

        static::deleted(function (Model $taggableModel) {
            $taggableModel->tags()->detach();
        });
    }
public static function bootTaggable()
    {
        static::created(function (Model $taggableModel) {
            if ($taggableModel->queuedTags) {
                $taggableModel->tag($taggableModel->queuedTags);

                $taggableModel->queuedTags = [];
            }
        });

        static::deleted(function (Model $taggableModel) {
            $taggableModel->tags()->detach();
        });
    }
public static function bootTaggable ( ) { static :: created ( function ( Model $ taggableModel ) { if ( $ taggableModel -> queuedTags ) { $ taggableModel -> tag ( $ taggableModel -> queuedTags ) ; $ taggableModel -> queuedTags = [ ] ; } } ) ; static :: deleted ( function ( Model $ taggableModel ) { $ taggableModel -> tags ( ) -> detach ( ) ; } ) ; }
Boot the taggable trait for a model.

@return void
Boot the taggable trait for a model .