pelican-panel-mirror/app/Notifications/SendPasswordReset.php
Boy132 513117cc42
Fix event listeners for notifications (#971)
* fix event listeners for notifications

* fix "visit panel" url
2025-02-08 14:32:56 +01:00

31 lines
930 B
PHP

<?php
namespace App\Notifications;
use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
class SendPasswordReset extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(public string $token) {}
public function via(): array
{
return ['mail'];
}
public function toMail(User $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.');
}
}