X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cd6572b61af2165133468d2562d04dffdca8fca8..refs/pull/3365/head:/app/Notifications/ResetPassword.php diff --git a/app/Notifications/ResetPassword.php b/app/Notifications/ResetPassword.php index affd8f076..7fa146596 100644 --- a/app/Notifications/ResetPassword.php +++ b/app/Notifications/ResetPassword.php @@ -2,10 +2,7 @@ namespace BookStack\Notifications; -use Illuminate\Notifications\Notification; -use Illuminate\Notifications\Messages\MailMessage; - -class ResetPassword extends Notification +class ResetPassword extends MailNotification { /** * The password reset token. @@ -17,24 +14,13 @@ class ResetPassword extends Notification /** * Create a notification instance. * - * @param string $token + * @param string $token */ public function __construct($token) { $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 +28,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')); } }