@extends('admin.layout', ['title' => 'Licenses']) @section('content') {{-- Hero: full width, no padding, only on this page --}}
Hero Background

License Manager Portal

You can view particular license by clicking on the view button.

{{-- Search by Key --}} {{-- Filter by Status --}}
{{ $status ? ucfirst($status) : 'Filter by status' }}
{{-- Create New Button --}} + Create New
@if (session('generated_keys'))
Generated Keys:
{{ implode("\n", session('generated_keys')) }}
@endif @php $statusRank = ['new' => 1, 'active' => 2, 'blocked' => 3, 'revoked' => 4]; $rows = $licenses->getCollection() ->sortBy(fn($l) => [$statusRank[$l->status] ?? 99, -$l->created_at->timestamp]) ->values(); @endphp
@forelse ($rows as $l) @empty @endforelse
Domain License Domain Key Status Max Activations Expires Created Action
{{ $l->latestActivation?->domain ?? '-' }} {{ $l->license_domain ?? '-' }} {{ $l->key }} @php $isExpired = $l->expires_at && \Carbon\Carbon::parse($l->expires_at)->isPast(); $st = strtolower($l->status); @endphp @if($isExpired) Expired @elseif($st === 'active') Active @elseif($st === 'block' || $st === 'blocked') Block @elseif($st === 'new') New @elseif($st === 'revoke' || $st === 'revoked') Revoke @else {{ ucfirst($l->status) }} @endif {{ $l->max_activations }} {{ $l->activations_count }} {{ $l->expires_at ? $l->expires_at->format('d M Y') : '-' }} {{ $l->created_at->format('d M Y') }}
No licenses found.
{{ $licenses->links() }}
{{-- Create / Edit License Modal --}} {{-- Delete Confirmation Modal --}} @if(session('success'))
{{ session('success') }}
@endif @endsection {{-- ===================== SINGLE SCRIPT BLOCK ===================== --}}