@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
{{ $errors->first() }}
@endif @php $payload = is_array($domain->whmcs_payload) ? $domain->whmcs_payload : []; $value = fn (...$keys) => collect($keys) ->map(fn ($key) => data_get($payload, $key)) ->first(fn ($item) => $item !== null && trim((string) $item) !== ''); $formatDate = function ($date) { if (! $date || in_array((string) $date, ['0000-00-00', '0000-00-00 00:00:00', '-'], true)) { return '-'; } try { return \Illuminate\Support\Carbon::parse($date)->format('l, F jS, Y'); } catch (\Throwable) { return (string) $date; } }; $formatMoney = function ($amount) use ($domain) { $currency = strtoupper((string) ($domain->currency ?: 'USD')); $formatted = number_format((float) $amount, 2); return $currency === 'USD' ? '$'.$formatted.' USD' : $currency.' '.$formatted; }; $status = strtolower(str_replace(' ', '_', (string) $domain->status)); $statusLabel = ucwords(str_replace('_', ' ', $status ?: 'pending')); $isActive = $status === 'active'; $registrationDate = $value('regdate', 'registrationdate', 'registration_date'); $nextDueDate = $value('nextduedate', 'next_due_date') ?: $domain->expiry_date; $expiryDate = $value('expirydate', 'expiry_date') ?: $domain->expiry_date; $firstPaymentAmount = $value('firstpaymentamount', 'first_payment_amount') ?? 0; $recurringAmount = $value('recurringamount', 'recurring_amount') ?? $domain->amount; $paymentMethod = $value('paymentmethodname', 'payment_method_name'); $paymentMethod = $paymentMethod ?: \Illuminate\Support\Str::headline((string) ($value('paymentmethod', 'payment_method') ?: '-')); $registrar = $value('registrar') ?: '-'; $registrationPeriod = (int) ($domain->registration_period ?: $value('regperiod', 'registrationperiod') ?: 0); $doNotRenew = filter_var($value('donotrenew', 'do_not_renew') ?? false, FILTER_VALIDATE_BOOLEAN); $autoRenewLabel = $doNotRenew ? 'Disabled' : 'Enabled'; $lastUpdated = optional($domain->whmcs_synced_at)->format('d M Y h:i A') ?: '-'; $sslStatus = $value('sslstatus', 'ssl_status', 'ssl.status'); $sslIssuer = $value('sslissuer', 'ssl_issuer', 'ssl.issuer'); $sslStartDate = $value('sslstartdate', 'ssl_start_date', 'ssl.start_date'); $sslExpiryDate = $value('sslexpirydate', 'ssl_expiry_date', 'ssl.expiry_date'); $hasSslData = $sslStatus || $sslIssuer || $sslStartDate || $sslExpiryDate; $nameserverValues = array_pad(array_values($nameservers ?? []), 5, ''); @endphp
Domain Registration

{{ $domain->domain_name }}

Manage domain information and registrar settings from your client portal.

{{ $statusLabel }} Expires: {{ $formatDate($expiryDate) }}
Overview

Domain Details

Last Updated: {{ $lastUpdated }}
Domain {{ $domain->domain_name }}
First Payment Amount {{ $formatMoney($firstPaymentAmount) }}
Registration Date {{ $formatDate($registrationDate) }}
Recurring Amount {{ $formatMoney($recurringAmount) }}{{ $registrationPeriod > 0 ? ' Every '.$registrationPeriod.' Year/s' : '' }}
Next Due Date {{ $formatDate($nextDueDate) }}
Payment Method {{ $paymentMethod }}
Quick Actions

Manage Domain

Nameserver changes are submitted directly to WHMCS and the configured registrar.

Renewal

Renew Your Domain

The renewal invoice and payment stay inside this portal. The registrar renewal is submitted after WHMCS confirms the invoice as paid.

@if ($pendingRenewalInvoice)
Renewal invoice already created Invoice {{ $pendingRenewalInvoice->invoice_number }} is waiting for payment.
View & Pay Invoice
@elseif (in_array($status, ['active', 'expired'], true) && count($renewalOptions ?? []) > 0)
@csrf
Next step: payment A WHMCS renewal invoice will be created and opened on the portal invoice page.
@else
{{ $renewalNotice ?: 'This domain cannot be renewed in its current status.' }}
@endif
@if ($isActive)
DNS Routing

Nameservers

At least two nameservers are required. DNS propagation may take several hours after an update.

@if ($nameserverNotice)
{{ $nameserverNotice }}
@endif
@csrf @foreach (range(1, 5) as $number) @endforeach
@else
Management Unavailable

Nameserver controls are not available yet

This domain is currently {{ strtolower($statusLabel) }}. Registrar controls will become available after activation.

@endif @if ($hasSslData)
Security

SSL Status

Status{{ $sslStatus ?: '-' }}
Issuer{{ $sslIssuer ?: '-' }}
Start Date{{ $formatDate($sslStartDate) }}
Expiry Date{{ $formatDate($sslExpiryDate) }}
@endif