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

37 lines
1.1 KiB
PHP

<?php
namespace App\Mail\Admin;
use App\Mail\TemplateMailable;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\SerializesModels;
class DomainOrderNewNotification extends TemplateMailable implements ShouldQueue
{
use Queueable, SerializesModels;
public function __construct(
protected array $data,
) {}
protected function scenario(): string
{
return 'admin_domain_order_new';
}
protected function variables(): array
{
return [
'company_name' => $this->data['company_name'] ?? config('app.name'),
'domain_name' => $this->data['domain_name'] ?? '',
'order_num' => $this->data['order_num'] ?? '',
'order_total' => $this->data['order_total'] ?? '',
'customer_name' => $this->data['customer_name'] ?? '',
'customer_email' => $this->data['customer_email'] ?? '',
'created_at' => $this->data['created_at'] ?? now()->format('d/m/Y H:i:s'),
'admin_url' => $this->data['admin_url'] ?? '',
];
}
}