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('Alerta cuentas de '.$this->notificacion['servicio'] ) ->greeting('Hola,') ->line('De '.$this->notificacion['servicio'].' quedan '. $this->notificacion['cantidad'] .' '.$this->notificacion['tipo'].' disponibles.') ->action('AƱadir cuentas', url('/planes')) ->line('Gracias por usar SirPremium!'); } /** * Get the array representation of the notification. * * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ 'servicio' => $this->notificacion['servicio'], 'cantidad' => $this->notificacion['cantidad'], 'tipo' => $this->notificacion['tipo'], ]; } }