2016-08-25 61 views
0

我一直在试图调试这个错误,因为昨天没有运气..我试图触发一个事件,以便它通过Pusher广播,然后用Echo处理,奇怪的事情是它的工作像9个消息,则它只是停止工作,甚至当它的工作仍然抛出的错误,这里是从工匠廷克错误:尝试触发事件时的序列化()错误

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)] 
); 

任何帮助表示赞赏。

回答

1

通过删除extends Event来解决。

相关问题