]> BookStack Code Mirror - bookstack/blob - app/Notifications/ResetPassword.php
Applied shelf book sort changes from testing
[bookstack] / app / Notifications / ResetPassword.php
1 <?php
2
3 namespace BookStack\Notifications;
4
5 class ResetPassword extends MailNotification
6 {
7     /**
8      * The password reset token.
9      *
10      * @var string
11      */
12     public $token;
13
14     /**
15      * Create a notification instance.
16      *
17      * @param string $token
18      */
19     public function __construct($token)
20     {
21         $this->token = $token;
22     }
23
24     /**
25      * Build the mail representation of the notification.
26      *
27      * @return \Illuminate\Notifications\Messages\MailMessage
28      */
29     public function toMail()
30     {
31         return $this->newMailMessage()
32             ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
33             ->line(trans('auth.email_reset_text'))
34             ->action(trans('auth.reset_password'), url('password/reset/' . $this->token))
35             ->line(trans('auth.email_reset_not_requested'));
36     }
37 }