src/Pagic/Concerns/HasEvents.php
protected function fireModelEvent($event, $halt = TRUE)
    {
        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' : 'fire';

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

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

        return !empty($result) ? $result : static::$dispatcher->{$method}(
            "eloquent.{$event}: ".static::class, $this
        );
    }
protected function fireModelEvent($event, $halt = TRUE)
    {
        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' : 'fire';

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

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

        return !empty($result) ? $result : static::$dispatcher->{$method}(
            "eloquent.{$event}: ".static::class, $this
        );
    }
Fire the given event for the model.

@param  string $event
@param  bool $halt

@return mixed