0

从昨天开始,我一直在尝试调试此错误,但没有运气..我正在尝试触发一个事件,以便通过 Pusher 广播它然后用 Echo 处理,奇怪的是它适用于 9 条消息然后它就停止了工作,即使它起作用了,仍然会抛出错误,这是工匠 Tinker 的错误:

http://i.imgur.com/aTVW5WM.png

事件:

class ClientAdded extends Event implements ShouldBroadcast
{
    use InteractsWithSockets, SerializesModels;

    public $client;

    /**
     * Create a new event instance.
     *
     * @param Client $client
     */
    public function __construct(Client $client)
    {
        $this->client = $client;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return Channel|array
     */
    public function broadcastOn()
    {
        return new Channel('clients');
    }
}

从中BroadcastingManager.php引发错误的代码:

$this->app->make('queue')->connection($connection)->pushOn(
    $queue, BroadcastEvent::class, ['event' => serialize(clone $event)]
);

任何帮助表示赞赏。

4

1 回答 1

1

通过删除解决extends Event

于 2016-08-25T11:18:17.170 回答