src/Foundation/DispatchEventsTrait.php
public function dispatchEventsFor($entity, User $actor = null)
    {
        foreach ($entity->releaseEvents() as $event) {
            $event->actor = $actor;

            $this->events->dispatch($event);
        }
    }
public function dispatchEventsFor($entity, User $actor = null)
    {
        foreach ($entity->releaseEvents() as $event) {
            $event->actor = $actor;

            $this->events->dispatch($event);
        }
    }
public function dispatchEventsFor ( $ entity , User $ actor = null ) { foreach ( $ entity -> releaseEvents ( ) as $ event ) { $ event -> actor = $ actor ; $ this -> events -> dispatch ( $ event ) ; } }
Dispatch all events for an entity.

@param object $entity
@param User $actor
Dispatch all events for an entity .