2021-06-26 23:23:15 +08:00
|
|
|
<?php
|
|
|
|
|
2023-09-12 02:26:28 +08:00
|
|
|
namespace BookStack\Access\Notifications;
|
2016-09-18 01:22:04 +08:00
|
|
|
|
2023-09-12 02:26:28 +08:00
|
|
|
use BookStack\App\MailNotification;
|
2023-09-02 22:11:42 +08:00
|
|
|
use BookStack\Users\Models\User;
|
|
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
|
2023-09-12 02:26:28 +08:00
|
|
|
class ResetPasswordNotification extends MailNotification
|
2016-09-18 01:22:04 +08:00
|
|
|
{
|
2023-09-02 22:11:42 +08:00
|
|
|
public function __construct(
|
|
|
|
public string $token
|
|
|
|
) {
|
2016-09-18 01:22:04 +08:00
|
|
|
}
|
|
|
|
|
2023-09-02 22:11:42 +08:00
|
|
|
public function toMail(User $notifiable): MailMessage
|
2016-09-18 01:22:04 +08:00
|
|
|
{
|
2021-06-26 23:23:15 +08:00
|
|
|
return $this->newMailMessage()
|
2016-11-14 00:34:28 +08:00
|
|
|
->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
|
|
|
|
->line(trans('auth.email_reset_text'))
|
2019-08-04 21:26:39 +08:00
|
|
|
->action(trans('auth.reset_password'), url('password/reset/' . $this->token))
|
2016-11-14 00:34:28 +08:00
|
|
|
->line(trans('auth.email_reset_not_requested'));
|
2016-09-18 01:22:04 +08:00
|
|
|
}
|
|
|
|
}
|