]> BookStack Code Mirror - bookstack/blob - app/Access/Notifications/ConfirmEmailNotification.php
PDF: Added tests for pdf command, fixed old tests for changes
[bookstack] / app / Access / Notifications / ConfirmEmailNotification.php
1 <?php
2
3 namespace BookStack\Access\Notifications;
4
5 use BookStack\App\MailNotification;
6 use BookStack\Users\Models\User;
7 use Illuminate\Notifications\Messages\MailMessage;
8
9 class ConfirmEmailNotification extends MailNotification
10 {
11     public function __construct(
12         public string $token
13     ) {
14     }
15
16     public function toMail(User $notifiable): MailMessage
17     {
18         $appName = ['appName' => setting('app-name')];
19
20         return $this->newMailMessage()
21                 ->subject(trans('auth.email_confirm_subject', $appName))
22                 ->greeting(trans('auth.email_confirm_greeting', $appName))
23                 ->line(trans('auth.email_confirm_text'))
24                 ->action(trans('auth.email_confirm_action'), url('/register/confirm/' . $this->token));
25     }
26 }