]> BookStack Code Mirror - bookstack/blob - app/Notifications/ResetPassword.php
Merge branch 'diff' of git://github.com/younes0/BookStack into younes0-diff
[bookstack] / app / Notifications / ResetPassword.php
1 <?php
2
3 namespace BookStack\Notifications;
4
5 use Illuminate\Notifications\Notification;
6 use Illuminate\Notifications\Messages\MailMessage;
7
8 class ResetPassword extends Notification
9 {
10     /**
11      * The password reset token.
12      *
13      * @var string
14      */
15     public $token;
16
17     /**
18      * Create a notification instance.
19      *
20      * @param  string  $token
21      */
22     public function __construct($token)
23     {
24         $this->token = $token;
25     }
26
27     /**
28      * Get the notification's channels.
29      *
30      * @param  mixed  $notifiable
31      * @return array|string
32      */
33     public function via($notifiable)
34     {
35         return ['mail'];
36     }
37
38     /**
39      * Build the mail representation of the notification.
40      *
41      * @return \Illuminate\Notifications\Messages\MailMessage
42      */
43     public function toMail()
44     {
45         return (new MailMessage)
46             ->line('You are receiving this email because we received a password reset request for your account.')
47             ->action('Reset Password', baseUrl('password/reset/' . $this->token))
48             ->line('If you did not request a password reset, no further action is required.');
49     }
50 }