42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Mail\Customer;
|
|
|
|
use App\Mail\TemplateMailable;
|
|
use App\Support\EmailTemplateShell;
|
|
use App\Support\MailGlobals;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class VmPasswordChanged extends TemplateMailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(public array $data) {}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function scenario(): string
|
|
{
|
|
return 'vm_password_changed';
|
|
}
|
|
|
|
protected function variables(): array
|
|
{
|
|
$data = [...MailGlobals::values(), ...$this->data];
|
|
$newPassword = $data['newPassword'] ?? '';
|
|
|
|
return [
|
|
'app_name' => $data['company_name'] ?? config('app.name', 'The Gioi So'),
|
|
'full_name' => $data['fullname'] ?? 'Quý khách',
|
|
'vm_name' => $data['vm_name'] ?? '',
|
|
'new_password_row' => $newPassword
|
|
? EmailTemplateShell::row('Mật khẩu mới', '<span style="font-family: Menlo,Consolas,monospace; color: #111827;">' . e($newPassword) . '</span>')
|
|
: '',
|
|
];
|
|
}
|
|
}
|