{{-- KPI CARDS --}}
Total Issued
{{ $metrics['total'] }}
Active / Valid
{{ $metrics['valid'] }}
Expired
{{ $metrics['expired'] }}
Revoked
{{ $metrics['revoked'] }}
{{-- FILTERS & ACTIONS --}}
{{-- DATA TABLE --}}
@forelse($certificates as $cert) @empty @endforelse
Cert Code / Student Program Completed Dates Grade Status Actions
{{ $cert->certificate_code }}
{{-- FIXED: Changed from first_name/last_name to name --}}
{{ $cert->student->name ?? 'Unknown Student' }}
@if ($cert->course_id) Course
{{ $cert->course->name ?? 'N/A' }}
@elseif($cert->package_id) Package {{-- FIXED: Changed from ->name to ->package_name --}}
{{ $cert->package->package_name ?? 'N/A' }}
@endif
Issued: {{ $cert->issue_date->format('d M, Y') }}
@if ($cert->expires_at)
Expires: {{ $cert->expires_at->format('d M, Y') }}
@else
Lifetime Validity
@endif
{{ $cert->grade ?: '-' }} @php // Check dynamic expiry first $currentStatus = $cert->status; if ($currentStatus === 'valid' && $cert->is_expired) { $currentStatus = 'expired'; } @endphp {{ ucfirst($currentStatus) }}
{{-- Print Button --}} {{-- Revoke Button (Only if valid and not expired) --}} @if ($cert->status == 'valid' && !$cert->is_expired) @endif
No certificates found.
@if ($certificates->hasPages())
{{ $certificates->links() }}
@endif