*/ public function via(object $notifiable): array { return [ 'broadcast', 'database' ]; } /** * Get the array representation of the notification. * * @return array */ public function toArray(object $notifiable): array { return [ 'title' => $this->title, 'description' => $this->description, 'message' => $this->message, 'type' => $this->type, ]; } /** * Transmitir notificación */ public function toBroadcast($notifiable) { return new BroadcastMessage([ 'title' => $this->title, 'description' => $this->description, 'typeNotification' => $this->type, 'timeout' => $this->timeout, ]); } }