3 namespace BookStack\Notifications;
5 use Illuminate\Bus\Queueable;
6 use Illuminate\Notifications\Notification;
7 use Illuminate\Contracts\Queue\ShouldQueue;
8 use Illuminate\Notifications\Messages\MailMessage;
10 class ConfirmEmail extends Notification implements ShouldQueue
18 * Create a new notification instance.
19 * @param string $token
21 public function __construct($token)
23 $this->token = $token;
27 * Get the notification's delivery channels.
29 * @param mixed $notifiable
32 public function via($notifiable)
38 * Get the mail representation of the notification.
40 * @param mixed $notifiable
41 * @return \Illuminate\Notifications\Messages\MailMessage
43 public function toMail($notifiable)
45 $appName = ['appName' => setting('app-name')];
46 return (new MailMessage)
47 ->subject(trans('auth.email_confirm_subject', $appName))
48 ->greeting(trans('auth.email_confirm_greeting', $appName))
49 ->line(trans('auth.email_confirm_text'))
50 ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));