protected function event($queue, $event)
    {
        if ($this->container && $this->container->bound(Dispatcher::class)) {
            $queue = Str::replaceFirst('queues:', '', $queue);

            $this->container->make(Dispatcher::class)->dispatch(
                $event->connection($this->getConnectionName())->queue($queue)
            );
        }
    }
protected function event($queue, $event)
    {
        if ($this->container && $this->container->bound(Dispatcher::class)) {
            $queue = Str::replaceFirst('queues:', '', $queue);

            $this->container->make(Dispatcher::class)->dispatch(
                $event->connection($this->getConnectionName())->queue($queue)
            );
        }
    }
protected function event ( $ queue , $ event ) { if ( $ this -> container && $ this -> container -> bound ( Dispatcher :: class ) ) { $ queue = Str :: replaceFirst ( 'queues:' , '' , $ queue ) ; $ this -> container -> make ( Dispatcher :: class ) -> dispatch ( $ event -> connection ( $ this -> getConnectionName ( ) ) -> queue ( $ queue ) ) ; } }
Fire the given event if a dispatcher is bound.

@param  string  $queue
@param  mixed  $event
@return void
Fire the given event if a dispatcher is bound .