Files
portal-api/app/Mail/Admin/TrialRegistrationRequest.php
2026-10-08 11:25:28 +07:00

44 lines
1.3 KiB
PHP

<?php
namespace App\Mail\Admin;
use App\Mail\TemplateMailable;
use App\Support\EmailTemplateShell;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
class TrialRegistrationRequest extends TemplateMailable
{
use Queueable, SerializesModels;
public function __construct(public array $data) {}
public function attachments(): array
{
return [];
}
protected function scenario(): string
{
return 'admin_trial_registration_request';
}
protected function variables(): array
{
return [
'customer_name' => $this->data['customer_name'] ?? 'N/A',
'customer_email' => $this->data['customer_email'] ?? 'N/A',
'customer_phone' => $this->data['customer_phone'] ?? 'N/A',
'cpu' => $this->data['cpu'] ?? '-',
'ram' => $this->data['ram'] ?? '-',
'ssd' => $this->data['ssd'] ?? '-',
'os' => $this->data['os'] ?? '-',
'other_row' => !empty($this->data['other'])
? EmailTemplateShell::row('Yêu cầu khác', e($this->data['other']))
: '',
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
'created_at' => $this->data['created_at'] ?? now()->format('d/m/Y H:i:s'),
];
}
}