LMongo\Eloquent\Model::setEventDispatcher PHP Méthode

setEventDispatcher() public static méthode

Set the event dispatcher instance.
public static setEventDispatcher ( Illuminate\Events\Dispatcher $dispatcher ) : void
$dispatcher Illuminate\Events\Dispatcher
Résultat void
    public static function setEventDispatcher(Dispatcher $dispatcher)
    {
        static::$dispatcher = $dispatcher;
    }

Usage Example

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     Model::setConnectionResolver($this->app['lmongo']);
     Model::setEventDispatcher($this->app['events']);
 }
Model