data = $data; } public function envelope(): Envelope { return new Envelope( subject: $this->renderFromTemplate('vm_creation_failed', $this->vars())['subject'], ); } public function content(): Content { return new Content( htmlString: $this->renderFromTemplate('vm_creation_failed', $this->vars())['html'], ); } public function attachments(): array { return []; } private function vars(): 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' => rtrim(env('FRONTEND_URL', config('app.url')), '/') . '/hoa-don/' . ($this->data['order_id'] ?? ''), 'support_email' => config('mail.support_email', 'support@example.com'), 'support_phone' => config('mail.support_phone', '1900-xxxx'), ]; } }