2016-08-25 5 views
0

어제부터 운이없는이 오류를 디버깅하려고했습니다. 이벤트를 발생시켜 푸시를 통해 브로드 캐스팅 한 다음 에코, 이상한 것으로 처리했습니다. 이 오류가 계속 발생되고 있었다 일 때 여기 장인 어설프게에서 오류가있어, 심지어 작동이 중지 그 다음을 추천 메시지 일 것입니다 :이벤트 발생시 serialize() 오류가 발생했습니다.

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.

관련 문제