name = $name; $this->msg = $msg; $this->url = $url; $this->icon = ''; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database','broadcast']; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'name' => $this->name, 'msg' => $this->msg, 'url' => $this->url, 'icon' => $this->icon ]; } public function broadcastType() { return 'notification.schedule'; } }