我从昨天起就试图调试这个错误而没有运气。我试图通过Pusher播放一个事件然后用Echo进行广播,奇怪的是那个它适用于9条消息,然后它就停止了工作,即使它工作时仍然会抛出错误,这是工匠修补匠的错误:
活动:
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)]
);
任何帮助表示感谢。
答案 0 :(得分:1)
删除extends Event
解决。