document_id = $document_id; $this->type = $type; $this->action = $action; $this->link = $link; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return [customDocumentChannel::class, 'broadcast']; // return ['database']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toDatabase($notifiable) { return [ 'type' => $this->type, 'action' => $this->action, 'link' => $this->link, 'workflow_document_id' => $this->document_id ]; } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ ]; } }