| 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. | |||||