@extends("admin.layouts.app") @section("title", __("admin.domains.title")) @section("content")
@if($registrars->count() > 0)
@endif
@if(request()->hasAny(["search","status","registrar","sort"])) {{ __('common.actions.reset') }} @endif
@forelse($domains as $domain) @php $expirySoon = $domain->expiry_date && $domain->expiry_date->diffInDays(now()) <= 30 && $domain->expiry_date->isFuture(); $expired = $domain->expiry_date && $domain->expiry_date->isPast(); $badgeClass = match(strtolower($domain->status ?? "")) { "active" => "badge-active", "pending" => "badge-pending", "expired" => "badge-terminated", default => "badge-cancelled", }; @endphp @empty @endforelse
{{ __('common.table.domain') }} {{ __('common.table.client') }} {{ __('common.table.registrar') }} {{ __('admin.domains.registered') }} {{ __('admin.domains.expires') }} {{ __('common.table.status') }} {{ __('common.table.actions') }}
{{ $domain->domain }} @if($domain->client) client_id) }}" style="color:#337ab7;text-decoration:none;">{{ $domain->client->full_name }} @else N/A @endif {{ ucfirst($domain->registrar ?? "-") }} {{ $domain->registration_date?->format("d M Y") ?? "-" }} {{ $domain->expiry_date?->format("d M Y") ?? "-" }} @if($expirySoon) (soon) @endif @if($expired) (expired) @endif {{ ucfirst($domain->status ?? "") }} {{ __('common.actions.view') }}
{{ __('admin.domains.no_domains') }}
{{ $domains->withQueryString()->links() }}
@endsection