message = $message; $this->user = $user; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new PrivateChannel('Expiry-Time.' . $this->user); } public function broadcastAs() { return 'Expiry-Time-Event'; } public function broadcastWith() { return [ 'message' => $this->message ]; } }