Files
pterodactyl-panel/app/Notifications/SendPasswordReset.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

45 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Pterodactyl\Models\User;
class SendPasswordReset extends Notification implements ShouldQueue
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct(public string $token) {}
/**
* Get the notification's delivery channels.
*
* @return list<string>
*/
public function via(): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
/** @param User $notifiable */
public function toMail(mixed $notifiable): MailMessage
{
return (new MailMessage)
->subject('Reset Password')
->line('You are receiving this email because we received a password reset request for your account.')
->action('Reset Password', url('/auth/password/reset/'.$this->token.'?email='.urlencode($notifiable->email)))
->line('If you did not request a password reset, no further action is required.');
}
}