Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Notifications/SendPasswordReset.php
7432 views
1
<?php
2
3
namespace Pterodactyl\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Notifications\Notification;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Notifications\Messages\MailMessage;
9
10
class SendPasswordReset extends Notification implements ShouldQueue
11
{
12
use Queueable;
13
14
/**
15
* Create a new notification instance.
16
*/
17
public function __construct(public string $token)
18
{
19
}
20
21
/**
22
* Get the notification's delivery channels.
23
*/
24
public function via(): array
25
{
26
return ['mail'];
27
}
28
29
/**
30
* Get the mail representation of the notification.
31
*/
32
public function toMail(mixed $notifiable): MailMessage
33
{
34
return (new MailMessage())
35
->subject('Reset Password')
36
->line('You are receiving this email because we received a password reset request for your account.')
37
->action('Reset Password', url('/auth/password/reset/' . $this->token . '?email=' . urlencode($notifiable->email)))
38
->line('If you did not request a password reset, no further action is required.');
39
}
40
}
41
42