53 lines
2.0 KiB
PHP
53 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Mail\Admin;
|
|
|
|
use App\Mail\TemplateMailable;
|
|
use App\Support\EmailTemplateShell;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class HostingAccountCreatedAdminNotification extends TemplateMailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
public function __construct(public readonly array $data) {}
|
|
|
|
public function attachments(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function scenario(): string
|
|
{
|
|
return 'admin_hosting_account_created';
|
|
}
|
|
|
|
protected function variables(): array
|
|
{
|
|
$row = fn (string $label, ?string $value) => $value
|
|
? EmailTemplateShell::row($label, e($value))
|
|
: '';
|
|
|
|
return [
|
|
'domain_name' => $this->data['domain_name'] ?? 'N/A',
|
|
'created_at' => $this->data['created_at'] ?? now()->format('d/m/Y H:i:s'),
|
|
'customer_name' => $this->data['customer_name'] ?? 'N/A',
|
|
'customer_email' => $this->data['customer_email'] ?? 'N/A',
|
|
'hosting_plan' => $this->data['hosting_plan'] ?? 'N/A',
|
|
'server_name' => $this->data['server_name'] ?? 'N/A',
|
|
'server_ip' => $this->data['server_ip'] ?? 'N/A',
|
|
'plesk_client_id' => $this->data['plesk_client_id'] ?? 'N/A',
|
|
'plesk_subscription_id' => $this->data['plesk_subscription_id'] ?? 'N/A',
|
|
'ftp_username' => $this->data['ftp_username'] ?? 'N/A',
|
|
'ftp_password_row' => $row('FTP Password', $this->data['ftp_password'] ?? null),
|
|
'plesk_panel_url' => $this->data['plesk_panel_url'] ?? 'N/A',
|
|
'plesk_login' => $this->data['plesk_login'] ?? 'N/A',
|
|
'plesk_password_row' => $row('Plesk Password', $this->data['plesk_password'] ?? null),
|
|
'company_name' => $this->data['company_name'] ?? 'Portal Admin',
|
|
];
|
|
}
|
|
}
|