message = $message; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['socket']; } /** * Get the socket representation of the notification. * * @param mixed $notifiable * @return SocketMessage */ public function toSocket($notifiable) { return (new SocketMessage()) ->data([ 'message' => $this->message['message'], 'payload' => $this->message['payload'], ]); } }