]> BookStack Code Mirror - bookstack/blobdiff - app/Notifications/ResetPassword.php
Update settings.php
[bookstack] / app / Notifications / ResetPassword.php
index affd8f07638330d2bc70acfbceb8e2c0150c2980..20875276400f0403d1a9a063459e37195a2cd475 100644 (file)
@@ -1,11 +1,6 @@
-<?php
+<?php namespace BookStack\Notifications;
 
-namespace BookStack\Notifications;
-
-use Illuminate\Notifications\Notification;
-use Illuminate\Notifications\Messages\MailMessage;
-
-class ResetPassword extends Notification
+class ResetPassword extends MailNotification
 {
     /**
      * The password reset token.
@@ -24,17 +19,6 @@ class ResetPassword extends Notification
         $this->token = $token;
     }
 
-    /**
-     * Get the notification's channels.
-     *
-     * @param  mixed  $notifiable
-     * @return array|string
-     */
-    public function via($notifiable)
-    {
-        return ['mail'];
-    }
-
     /**
      * Build the mail representation of the notification.
      *
@@ -42,10 +26,10 @@ class ResetPassword extends Notification
      */
     public function toMail()
     {
-        return (new MailMessage)
+            return $this->newMailMessage()
             ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
             ->line(trans('auth.email_reset_text'))
-            ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token))
+            ->action(trans('auth.reset_password'), url('password/reset/' . $this->token))
             ->line(trans('auth.email_reset_not_requested'));
     }
 }