2021-06-26 11:23:15 -04:00
|
|
|
<?php
|
|
|
|
|
2023-09-11 14:26:28 -04:00
|
|
|
namespace BookStack\Access\Notifications;
|
2016-09-17 13:22:04 -04:00
|
|
|
|
2023-09-11 14:26:28 -04:00
|
|
|
use BookStack\App\MailNotification;
|
2023-09-02 10:11:42 -04:00
|
|
|
use BookStack\Users\Models\User;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
|
2023-09-11 14:26:28 -04:00
|
|
|
class ConfirmEmailNotification extends MailNotification
|
2016-09-17 13:22:04 -04:00
|
|
|
{
|
2023-09-02 10:11:42 -04:00
|
|
|
public function __construct(
|
|
|
|
public string $token
|
|
|
|
) {
|
2016-09-17 13:22:04 -04:00
|
|
|
}
|
|
|
|
|
2023-09-02 10:11:42 -04:00
|
|
|
public function toMail(User $notifiable): MailMessage
|
2016-09-17 13:22:04 -04:00
|
|
|
{
|
2016-09-17 16:33:55 -04:00
|
|
|
$appName = ['appName' => setting('app-name')];
|
2021-06-26 11:23:15 -04:00
|
|
|
|
2018-12-16 15:44:57 -05:00
|
|
|
return $this->newMailMessage()
|
|
|
|
->subject(trans('auth.email_confirm_subject', $appName))
|
|
|
|
->greeting(trans('auth.email_confirm_greeting', $appName))
|
|
|
|
->line(trans('auth.email_confirm_text'))
|
2019-08-04 09:26:39 -04:00
|
|
|
->action(trans('auth.email_confirm_action'), url('/register/confirm/' . $this->token));
|
2016-09-17 13:22:04 -04:00
|
|
|
}
|
|
|
|
}
|