Exemplo n.º 1
0
 /**
  * Remove all of the event listeners for the model.
  *
  * @return void
  */
 public static function flushEventListeners()
 {
     if (!isset(static::$dispatcher)) {
         return;
     }
     $instance = new static();
     foreach ($instance->getObservableEvents() as $event) {
         static::$dispatcher->forget("orm.{$event}: " . get_called_class());
     }
 }