从昨天开始,我一直在尝试调试此错误,但没有运气..我正在尝试触发一个事件,以便通过 Pusher 广播它然后用 Echo 处理,奇怪的是它适用于 9 条消息然后它就停止了工作,即使它起作用了,仍然会抛出错误,这是工匠 Tinker 的错误:
事件:
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)]
);
任何帮助表示赞赏。