Files
portal-api/app/Mail/Customer/VMCreationFailed.php
2026-10-05 09:30:24 +07:00

44 lines
1.1 KiB
PHP

<?php
namespace App\Mail\Customer;
use App\Mail\TemplateMailable;
use App\Support\MailGlobals;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
class VMCreationFailed extends TemplateMailable
{
use Queueable, SerializesModels;
public array $data;
public function __construct(array $data)
{
$this->data = $data;
}
public function attachments(): array
{
return [];
}
protected function scenario(): string
{
return 'vm_creation_failed';
}
protected function variables(): array
{
return [
'app_name' => config('app.name', 'Thế Giới Số'),
'full_name' => $this->data['customer_name'] ?? 'Khách hàng',
'order_num' => $this->data['order_num'] ?? 'N/A',
'product_name' => $this->data['product_name'] ?? 'Sản phẩm',
'invoice_url' => MailGlobals::frontendUrl() . '/hoa-don/' . ($this->data['order_id'] ?? ''),
'support_email' => config('mail.support_email', 'support@example.com'),
'support_phone' => config('mail.support_phone', '1900-xxxx'),
];
}
}