data = $data; } public function envelope(): Envelope { return new Envelope( subject: 'V/v: Thông báo nạp tiền thành công - ' . number_format($this->data['amount']) . ' VNĐ', ); } public function content(): Content { return new Content( view: 'emails.customer.deposit-success', with: [ 'customerName' => $this->data['customer_name'] ?? 'Khách hàng', 'transactionCode' => $this->data['transaction_code'] ?? 'N/A', 'amount' => $this->data['amount'] ?? 0, 'amountFormatted' => number_format($this->data['amount']) ?? '0', 'credit' => $this->data['credit'] ?? 0, 'creditFormatted' => number_format($this->data['credit']) ?? '0', 'currentTotal' => $this->data['current_total'] ?? 0, 'currentTotalFormatted' => number_format($this->data['current_total']) ?? '0', 'currentCredit' => $this->data['current_credit'] ?? 0, 'currentCreditFormatted' => number_format($this->data['current_credit']) ?? '0', 'depositDate' => $this->data['deposit_date'] ?? now()->format('d/m/Y H:i:s'), 'supportEmail' => config('mail.support_email', 'support@thegioiso.com'), 'supportPhone' => config('mail.support_phone', '1900.xxxx'), ], ); } }