X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/dfaf20dd83a838be36a0492c37e055a46b449e77..refs/pull/3391/head:/app/Notifications/ConfirmEmail.php diff --git a/app/Notifications/ConfirmEmail.php b/app/Notifications/ConfirmEmail.php index 27ac89c32..5399c25a8 100644 --- a/app/Notifications/ConfirmEmail.php +++ b/app/Notifications/ConfirmEmail.php @@ -2,20 +2,13 @@ namespace BookStack\Notifications; -use Illuminate\Bus\Queueable; -use Illuminate\Notifications\Notification; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Notifications\Messages\MailMessage; - -class ConfirmEmail extends Notification implements ShouldQueue +class ConfirmEmail extends MailNotification { - - use Queueable; - public $token; /** * Create a new notification instance. + * * @param string $token */ public function __construct($token) @@ -23,31 +16,21 @@ class ConfirmEmail extends Notification implements ShouldQueue $this->token = $token; } - /** - * Get the notification's delivery channels. - * - * @param mixed $notifiable - * @return array - */ - public function via($notifiable) - { - return ['mail']; - } - /** * Get the mail representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable + * * @return \Illuminate\Notifications\Messages\MailMessage */ public function toMail($notifiable) { $appName = ['appName' => setting('app-name')]; - return (new MailMessage) - ->subject(trans('auth.email_confirm_subject', $appName)) - ->greeting(trans('auth.email_confirm_greeting', $appName)) - ->line(trans('auth.email_confirm_text')) - ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token)); - } + return $this->newMailMessage() + ->subject(trans('auth.email_confirm_subject', $appName)) + ->greeting(trans('auth.email_confirm_greeting', $appName)) + ->line(trans('auth.email_confirm_text')) + ->action(trans('auth.email_confirm_action'), url('/http/source.bookstackapp.com/register/confirm/' . $this->token)); + } }