livestream = $livestream; $this->chatmsg = $chatmsg; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new PrivateChannel('live.chat.' . $this->livestream->profile_id); } public function broadcastAs() { return 'chat.pin-message'; } public function broadcastWith() { return $this->chatmsg; } }