36 lines
903 B
PHP
36 lines
903 B
PHP
<?php
|
|
|
|
namespace Modules\Auth\Emails;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class EmailVerificationOtpEmail extends Notification
|
|
{
|
|
use Queueable;
|
|
|
|
public function __construct(
|
|
protected string $otp
|
|
) {}
|
|
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['mail'];
|
|
}
|
|
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
$minutes = (int) config('auth.email_verification.expiry_minutes', 10);
|
|
|
|
return (new MailMessage)
|
|
->subject('Pengesahan E-mel - Kod OTP')
|
|
->markdown('auth::emails.verification-otp', [
|
|
'name' => $notifiable->name,
|
|
'otp' => $this->otp,
|
|
'minutes' => $minutes,
|
|
'logoPath' => public_path('images/logo-kopkb.svg'),
|
|
]);
|
|
}
|
|
}
|