]> BookStack Code Mirror - bookstack/blob - app/Notifications/ConfirmEmail.php
Added initial translation into German (formal)
[bookstack] / app / Notifications / ConfirmEmail.php
1 <?php
2
3 namespace BookStack\Notifications;
4
5 use Illuminate\Notifications\Notification;
6 use Illuminate\Notifications\Messages\MailMessage;
7
8 class ConfirmEmail extends Notification
9 {
10
11     public $token;
12
13     /**
14      * Create a new notification instance.
15      * @param string $token
16      */
17     public function __construct($token)
18     {
19         $this->token = $token;
20     }
21
22     /**
23      * Get the notification's delivery channels.
24      *
25      * @param  mixed  $notifiable
26      * @return array
27      */
28     public function via($notifiable)
29     {
30         return ['mail'];
31     }
32
33     /**
34      * Get the mail representation of the notification.
35      *
36      * @param  mixed  $notifiable
37      * @return \Illuminate\Notifications\Messages\MailMessage
38      */
39     public function toMail($notifiable)
40     {
41         $appName = ['appName' => setting('app-name')];
42         return (new MailMessage)
43                     ->subject(trans('auth.email_confirm_subject', $appName))
44                     ->greeting(trans('auth.email_confirm_greeting', $appName))
45                     ->line(trans('auth.email_confirm_text'))
46                     ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));
47     }
48
49 }