public static function bootHasWidgets()
    {
        static::created(function (Model $widgetableModel) {
            if ($widgetableModel->queuedWidgets) {
                $widgetableModel->attachWidgets($widgetableModel->queuedWidgets);
                $widgetableModel->queuedWidgets = [];
            }
        });

        static::deleted(function (Model $widgetableModel) {
            $widgetableModel->syncWidgets(null);
        });
    }
public static function bootHasWidgets()
    {
        static::created(function (Model $widgetableModel) {
            if ($widgetableModel->queuedWidgets) {
                $widgetableModel->attachWidgets($widgetableModel->queuedWidgets);
                $widgetableModel->queuedWidgets = [];
            }
        });

        static::deleted(function (Model $widgetableModel) {
            $widgetableModel->syncWidgets(null);
        });
    }
public static function bootHasWidgets ( ) { static :: created ( function ( Model $ widgetableModel ) { if ( $ widgetableModel -> queuedWidgets ) { $ widgetableModel -> attachWidgets ( $ widgetableModel -> queuedWidgets ) ; $ widgetableModel -> queuedWidgets = [ ] ; } } ) ; static :: deleted ( function ( Model $ widgetableModel ) { $ widgetableModel -> syncWidgets ( null ) ; } ) ; }
Boot the widgetable trait for a model.

@return void
Boot the widgetable trait for a model .