public static function bootHasImageUploads()
    {
        // hook up the events
        static::saved(function ($model) {
            // check for autoupload disabled
            if (!$model->disableAutoUpload) {
                $model->autoUpload();
            }
        });

        // delete event
        static::deleted(function ($model) {
            $model->autoDeleteImage();
        });
    }
public static function bootHasImageUploads()
    {
        // hook up the events
        static::saved(function ($model) {
            // check for autoupload disabled
            if (!$model->disableAutoUpload) {
                $model->autoUpload();
            }
        });

        // delete event
        static::deleted(function ($model) {
            $model->autoDeleteImage();
        });
    }
public static function bootHasImageUploads ( ) { // hook up the events static :: saved ( function ( $ model ) { // check for autoupload disabled if ( ! $ model -> disableAutoUpload ) { $ model -> autoUpload ( ) ; } } ) ; // delete event static :: deleted ( function ( $ model ) { $ model -> autoDeleteImage ( ) ; } ) ; }
Boot up the trait
Boot up the trait