notificacion = $notificacion; } /** * Get the notification's delivery channels. * * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database','mail']; } /** * Get the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { return (new MailMessage) ->subject('Credenciales '.$this->notificacion['servicio']) ->greeting('Hola,'.$this->notificacion['cliente']) ->line('Sus credenciales de acceso '.$this->notificacion['servicio']) ->action('Ver credenciales', url($this->notificacion['enlace'])) ->line('Gracias por usar SirPremium!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'fecha_final' => $this->notificacion['fecha_final'], 'cliente' => $this->notificacion['cliente'], 'servicio' => $this->notificacion['servicio'], 'tipo' => $this->notificacion['tipo'], 'vendedor' =>$this->notificacion['vendedor'], 'enlace' =>$this->notificacion['enlace'], ]; } }