Illuminate\Database\Eloquent\Model::clearBootedModels PHP Method

clearBootedModels() public static method

Clear the list of booted models so they will be re-booted.
public static clearBootedModels ( ) : void
return void
    public static function clearBootedModels()
    {
        static::$booted = [];
        static::$globalScopes = [];
    }

Usage Example

 /**
  * @param $resolver
  */
 protected function bootModels($resolver)
 {
     Model::clearBootedModels();
     Model::setEventDispatcher($this->app['illuminate.events']);
     Model::setConnectionResolver($resolver);
     $this->app['dispatcher']->dispatch(NineEvents::MODELS_BOOTED, new EloquentEvent($this->container->get('db')));
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::clearBootedModels
Model