renderFromTemplate('hosting_account_created', $this->vars())['subject'], ); } public function content(): Content { return new Content( htmlString: $this->renderFromTemplate('hosting_account_created', $this->vars())['html'], ); } public function attachments(): array { return []; } private function payload(): array { try { $setting = Setting::where('key', 'setting')->first(); $settingValue = $setting ? json_decode((string) $setting->value, true) : []; } catch (\Throwable) { $settingValue = []; } return array_merge([ 'company_name' => $settingValue['company'] ?? config('app.name', 'The Gioi So'), 'support_email' => $settingValue['email'] ?? config('mail.support_email', 'support@thegioiso.com'), 'support_phone' => $settingValue['hotline'] ?? ($settingValue['phone'] ?? config('mail.support_phone', '1900.xxxx')), 'login_url' => rtrim(config('app.frontend_url', ''), '/') . '/dang-nhap', ], $this->data); } private function vars(): array { $data = $this->payload(); $row = fn (string $label, ?string $value) => $value ? "
TÀI KHOẢN ĐĂNG NHẬP PLESK PANEL
' . '| Địa chỉ Panel: | ' . ($data['plesk_panel_url'] ?? '') . ' |
| Tên đăng nhập: | ' . ($data['plesk_login'] ?? '') . ' |
| Mật khẩu: | ' . $data['plesk_password'] . ' |
Lưu ý: Vì lý do bảo mật, mật khẩu FTP chỉ được gửi một lần duy nhất qua email và không được lưu trữ trên hệ thống. Vui lòng lưu lại ở nơi an toàn.
' : '', 'plesk_block' => $pleskBlock, 'login_url' => $data['login_url'] ?? rtrim(config('app.frontend_url', ''), '/') . '/dang-nhap', 'support_email' => $data['support_email'] ?? config('mail.support_email', 'support@thegioiso.com'), 'support_phone' => $data['support_phone'] ?? config('mail.support_phone', '1900.xxxx'), ]; } }