Fire the given event for the model.

@param string $event
@param bool   $halt

@return mixed
4115
public function fireModelEvent($event, $halt = true, $relationName = null, $ids = [], $idsAttributes = [])
    {
        if (!isset(static::$dispatcher)) {
            return true;
        }

        // First, we will get the proper method to call on the event dispatcher, and then we
        // will attempt to fire a custom, object based event for the given event. If that
        // returns a result we can return that result, or we'll call the string events.
        $method = $halt ? 'until' : 'dispatch';

        $result = $this->filterModelEventResults(
            $this->fireCustomModelEvent($event, $method)
        );

        if (false === $result) {
            return false;
        }

        $payload = ['model' => $this, 'relation' => $relationName, 'pivotIds' => $ids, 'pivotIdsAttributes' => $idsAttributes];

        return !empty($result) ? $result : static::$dispatcher->{$method}(
            "eloquent.{$event}: ".static::class, $payload
        );
    }
283443
public function fire(string $event, ...$args): bool
    {
        if (!isset(self::$events[$event])) {
            return false;
        }

        // call event handlers of the event.
        foreach ((array)self::$eventHandlers[$event] as $cb) {
            // return FALSE to stop go on handle.
            if (false === $cb(...$args)) {
                break;
            }
        }

        // is a once event, remove it
        if (self::$events[$event]) {
            return $this->off($event);
        }

        return true;
    }
393786
public function off($event)
    {
        if ($this->hasEvent($event)) {
            $handler = $this->eventHandlers[$event];

            unset($this->events[$event], $this->eventHandlers[$event]);

            return $handler;
        }

        return null;
    }
234296
private function fireEvent($event, ...$params)
    {
        if (!$this->eventManager) {
            return;
        }

        $this->eventManager->handle($event, ...$params);
    }
1354228
protected function triggerEvent($event)
    {
        $instance = static::cyrus();

        if (method_exists($instance, $event) &&
            in_array($event, $instance->getModelEvents())
        ) {
            $instance->{$event}($instance);
        }
    }
250737
public function onSave(Event\Save $event)
    {
        $success = $event->getUser()->save();
        $event->setResult( (bool)$success );
        if( $event->getResult() === false )
        {
            $event->stopPropagation(true);
        }
        return $event;
    }
1310723
private function fireEvent($event)
    {
        $env = $this->formatEventName($event);

        if (emitter()->bound($env)) {
            emitter()->emit($env, $this);
        }
    }
672643
private function fireEvent($event, $payload = [], $halt = false)
    {
        return $this->getEventDispatcher()->fire($event, $payload, $halt);
    }
955190
protected function execute($event)
    {
        foreach($this->events[$event] as $handler) {
            $this->listen($event, $handler);
        }
    }
747119
public function fireOff(string $event, $sender, array $arguments = null) {
        $arguments = (array)$arguments;
        array_unshift($arguments, $sender);
        return $this->fire($event, $arguments);
    }
881
protected function raise($event)
    {
        $qualified = get_class($event);
        $name = str_replace('\\', '.', $qualified);

        $this->events->fire($name, [$event]);
    }
881764
function handle(Event $event)
    {
        if ($this->accept($event)) {
            $this->onEvent($event);
            return true;
        }

        return false;
    }
195226
public function onDelete(Event\Delete $event)
    {
        $success = $event->getUser()->delete();
        $event->setResult( (bool)$success );
        if( $event->getResult() === false )
        {
            $event->stopPropagation(true);
        }
        return $event;
    }
1139123
public function triggerEvent($event)
	{
		if (!($event instanceof EventInterface))
		{
			if (isset($this->events[$event]))
			{
				$event = $this->events[$event];
			}

			else
			{
				$event = new Event($event);
			}
		}

		if (isset($this->listeners[$event->getName()]))
		{
			foreach ($this->listeners[$event->getName()] as $listener)
			{
				if ($event->isStopped())
				{
					return $event;
				}

				if ($listener instanceof Closure)
				{
					call_user_func($listener, $event);
				}

				else
				{
					call_user_func(array($listener, $event->getName()), $event);
				}
			}
		}

		return $event;
	}
455414
protected function fireEvent($eventName, array $vars = array(), $halt = true)
    {
        $method    = $halt ? 'until' : 'fire';
        $eventName = sprintf('%s:%s', $this->name(), $eventName);

        return Subbly::events()->{$method}($eventName, $vars);
    }
419828
protected function fire(string $event, array $args = [])
    {
        if (!$cb = $this->getOption($event)) {
            return null;
        }

        return RouteHelper::call($cb, $args);
    }
1228286
public function fireDecoyEvent($event, $args = null)
    {
        $event = "decoy::model.{$event}: ".get_class($this);

        return Event::fire($event, $args);
    }