@extends('admin.layout', ['title' => 'License Details']) @section('content') @php $status = strtolower($license->status); $isExpired = $license->expires_at && now()->greaterThan($license->expires_at); $statusLabel = $isExpired ? 'expired' : $status; $isRevoked = $statusLabel === 'revoked'; $statusDot = match($statusLabel) { 'active' => 'bg-green-500', 'blocked' => 'bg-red-500', 'revoked' => 'bg-gray-400', 'expired' => 'bg-red-600', default => 'bg-blue-500', }; $statusBadge = match($statusLabel) { 'active' => 'text-green-700 border-green-200 bg-green-50', 'blocked' => 'text-red-700 border-red-200 bg-red-50', 'revoked' => 'text-gray-500 border-gray-200 bg-gray-50', 'expired' => 'text-red-700 border-red-200 bg-red-50', default => 'text-blue-700 border-blue-200 bg-blue-50', }; @endphp {{-- ── BREADCRUMB + TITLE ── --}}
Licenses / Details
{{-- ── MAIN GRID ── --}}

License Details

{{-- ═══ LEFT COLUMN (8/12 on desktop, full on mobile) ═══ --}}
{{-- KEY CARD --}}
{{-- Top row: label + status badge --}}
Key Identifier {{ strtoupper($statusLabel) }}
{{-- Key + copy button --}}
{{ $license->key }}
{{-- Stats grid: 3-col desktop / 2-col mobile --}}

Activations Limit

{{ $license->activations->count() }} / {{ $license->max_activations }}

Issued On

{{ $license->created_at->format('M d, Y') }}

Renewal Date

{{ $license->expires_at ? $license->expires_at->format('M d, Y') : '-' }}

{{-- Plan Type: shown as 4th cell on mobile --}}

Plan Type

{{ $license->plan_type ?? 'Annual' }}

{{-- Mobile: Unblock Key big blue button --}}
@csrf
{{-- Mobile: Block Usage + Revoke License ghost buttons --}}
@csrf
@csrf
{{-- CONNECTED ACTIVATIONS CARD --}}
Connected Activations {{ $license->activations->count() }} Total
{{-- ── DESKTOP TABLE ── --}}
@forelse($license->activations as $a) @empty @endforelse
Domain Fingerprint Hash IP Activated At Last Check App Version
{{ $a->domain ?? '-' }}
{{ $a->fingerprint_hash ?? '-' }} {{ $a->ip ?? '-' }} {{ $a->activated_at?->format('Y-m-d H:i') ?? '-' }} {{ $a->last_check_at?->format('Y-m-d H:i') ?? '-' }} {{ $a->app_version ?? '-' }}
No activations yet.
{{-- ── MOBILE CARDS ── --}}
@forelse($license->activations as $a)
{{-- Domain row (matches screenshot: globe icon + domain + fingerprint) --}}

{{ $a->domain ?? '-' }}

{{ $a->fingerprint_hash ?? '-' }}

{{-- 2x2 grid: IP, Activated At, Last Check, App Version --}}

IP Address

{{ $a->ip ?? '-' }}

Activated At

{{ $a->activated_at?->format('M d, Y') ?? '-' }}

Last Check

{{ $a->last_check_at ? $a->last_check_at->diffForHumans() : '-' }}

App Version

{{ $a->app_version ?? '-' }}

@empty
No activations yet.
@endforelse
{{-- ═══ RIGHT COLUMN (4/12 desktop, hidden on mobile — actions are in key card) ═══ --}}
{{-- Delete Confirmation Modal --}} {{-- Snackbar --}} @if(session('success'))
{{ session('success') }}
@endif @if($errors->has('status'))
{{ $errors->first('status') }}
@endif @endsection