@section('page-title', 'My Hosting Accounts')
My Hosting Accounts
@if($hostings->isEmpty())

No hosting accounts found.

@else
@foreach($hostings as $hosting) @php $daysLeft = $hosting->expiry_date ? now()->diffInDays($hosting->expiry_date, false) : null; @endphp @endforeach
Domain Type Server Expiry Billing Cycle Renewal Amount Status
{{ $hosting->primary_domain }}
@if($hosting->cpanel_username) cPanel: {{ $hosting->cpanel_username }}
Login to cPanel @endif
{{ $hosting->hosting_type }} {{ $hosting->server->name ?? '—' }} {{ $hosting->expiry_date?->format('d M Y') ?? '—' }} @if($daysLeft !== null)
{{ $daysLeft <= 0 ? 'Expired' : 'in ' . (int)$daysLeft . ' days' }} @endif
{{ str_replace('_', ' ', $hosting->billing_cycle) }} {{ number_format($hosting->renewal_amount, 2) }} {{ $hosting->currency }} @if($hosting->status === 'active')Active @elseif($hosting->status === 'expired')Expired @elseif($hosting->status === 'suspended')Suspended @else{{ $hosting->status }}@endif
@endif