ManagementSystem/BACKEND/app/Notifications/VerifyEmail.php

60 lines
1.5 KiB
PHP
Executable File

<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Auth\Notifications\VerifyEmail as VerifyEmailNotification;
class VerifyEmail extends VerifyEmailNotification
{
use Queueable;
/**
* Create a new notification instance.
*/
public function __construct()
{
//
}
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via($notifiable)
{
return ['mail']; // You can customize this based on your requirements
}
/**
* Get the mail representation of the notification.
*/
public function toMail($notifiable)
{
return (new MailMessage)
->subject('SN Check - Verify Email Address')
->line('Please click the button below to verify your email address.')
->action(
'Verify Email Address',
$this->verificationUrl($notifiable) . '&confirmation_code=' . $notifiable->confirmation_code
)
// ->line('Your confirmation code: ' . $notifiable->confirmation_code)
->line('If you did not create an account, no further action is required.');
}
/**
* Get the array representation of the notification.
*
* @return array<string, mixed>
*/
public function toArray(object $notifiable): array
{
return [
//
];
}
}