]> BookStack Code Mirror - bookstack/blob - app/Notifications/ConfirmEmail.php
7ecadc298f1f4042a7b887584ca6820bec7bb926
[bookstack] / app / Notifications / ConfirmEmail.php
1 <?php namespace BookStack\Notifications;
2
3 class ConfirmEmail extends MailNotification
4 {
5     public $token;
6
7     /**
8      * Create a new notification instance.
9      * @param string $token
10      */
11     public function __construct($token)
12     {
13         $this->token = $token;
14     }
15
16     /**
17      * Get the mail representation of the notification.
18      *
19      * @param  mixed  $notifiable
20      * @return \Illuminate\Notifications\Messages\MailMessage
21      */
22     public function toMail($notifiable)
23     {
24         $appName = ['appName' => setting('app-name')];
25         return $this->newMailMessage()
26                 ->subject(trans('auth.email_confirm_subject', $appName))
27                 ->greeting(trans('auth.email_confirm_greeting', $appName))
28                 ->line(trans('auth.email_confirm_text'))
29                 ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));
30     }
31 }