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