src/Collection.php
public function triggerModels($name, ModelEvent $event = null)
    {
        if ($event === null) {
            $event = new ModelEvent();
        }
        foreach ($this->models as $model) {
            $model->trigger($name, $event);
        }

        return $event->isValid;
    }
public function triggerModels($name, ModelEvent $event = null)
    {
        if ($event === null) {
            $event = new ModelEvent();
        }
        foreach ($this->models as $model) {
            $model->trigger($name, $event);
        }

        return $event->isValid;
    }
public function triggerModels ( $ name , ModelEvent $ event = null ) { if ( $ event === null ) { $ event = new ModelEvent ( ) ; } foreach ( $ this -> models as $ model ) { $ model -> trigger ( $ name , $ event ) ; } return $ event -> isValid ; }
Iterates over all of the models and triggers some event.
@param string     $name  the event name
@param ModelEvent $event
@return bool whether is valid
Iterates over all of the models and triggers some event .