web-kursus2/app/Notifications/CustomResetPasswordNotification.php
2025-10-30 14:17:23 +07:00

28 lines
622 B
PHP

<?php
namespace App\Notifications;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class CustomResetPasswordNotification extends Notification
{
public $token;
public function __construct($token)
{
$this->token = $token;
}
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Custom Password Reset Subject')
->action('Reset Password', url(config('app.url').route('password.reset', $this->token, false)));
}
}