3 namespace BookStack\Notifications;
5 use Illuminate\Notifications\Notification;
6 use Illuminate\Notifications\Messages\MailMessage;
8 class ConfirmEmail extends Notification
14 * Create a new notification instance.
15 * @param string $token
17 public function __construct($token)
19 $this->token = $token;
23 * Get the notification's delivery channels.
25 * @param mixed $notifiable
28 public function via($notifiable)
34 * Get the mail representation of the notification.
36 * @param mixed $notifiable
37 * @return \Illuminate\Notifications\Messages\MailMessage
39 public function toMail($notifiable)
41 $appName = ['appName' => setting('app-name')];
42 return (new MailMessage)
43 ->subject(trans('auth.email_confirm_subject', $appName))
44 ->greeting(trans('auth.email_confirm_greeting', $appName))
45 ->line(trans('auth.email_confirm_text'))
46 ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));