DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
|
||||
namespace Modules\Auth\Emails;
|
||||
|
||||
use App\Notifications\Concerns\BuildsMailMessage;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class EmailVerificationOtpEmail extends Notification
|
||||
{
|
||||
use BuildsMailMessage;
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
@@ -23,13 +25,14 @@ class EmailVerificationOtpEmail extends Notification
|
||||
{
|
||||
$minutes = (int) config('auth.email_verification.expiry_minutes', 10);
|
||||
|
||||
return (new MailMessage)
|
||||
->subject('Pengesahan E-mel - Kod OTP')
|
||||
->markdown('auth::emails.verification-otp', [
|
||||
return $this->mailMessage(
|
||||
subject: 'Pengesahan E-mel - Kod OTP',
|
||||
view: 'auth::emails.verification-otp',
|
||||
data: [
|
||||
'name' => $notifiable->name,
|
||||
'otp' => $this->otp,
|
||||
'minutes' => $minutes,
|
||||
'logoPath' => public_path('images/logo-kopkb.svg'),
|
||||
]);
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Auth\Emails;
|
||||
|
||||
use App\Notifications\Concerns\BuildsMailMessage;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class PasswordResetOtpEmail extends Notification
|
||||
{
|
||||
use BuildsMailMessage;
|
||||
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.password_reset.expiry_minutes', 10);
|
||||
|
||||
return $this->mailMessage(
|
||||
subject: 'Reset Kata Laluan - Kod OTP',
|
||||
view: 'auth::emails.password-reset-otp',
|
||||
data: [
|
||||
'name' => $notifiable->name,
|
||||
'otp' => $this->otp,
|
||||
'minutes' => $minutes,
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user