@extends('layouts.app') @section('title', 'Course Library') @section('content') @include('partials.flash') {{-- Toolbar --}}
search
download Sample add New Course
{{-- Excel/CSV course importer --}}
@forelse($courses as $course) @php $statusBadge = match($course->status) { 'published' => 'bg-secondary-container text-on-secondary-container', 'archived' => 'bg-surface-container-high text-outline', 'trainer_review' => 'bg-gold/20 text-[#8a6d3b]', default => 'bg-primary/10 text-primary', }; $categoryLabel = \Illuminate\Support\Str::headline($course->category); @endphp @empty @endforelse
Course Category Duration Enrolled Status Actions
@if($course->thumbnail) @else school @endif

{{ $course->title }}

{{ $course->course_id }}

{{ $categoryLabel }} {{ $course->duration_minutes }} min {{ $course->enrollments_count }} {{ $course->status === 'trainer_review' ? 'Trainer review' : ucfirst($course->status) }} @if($course->status === 'trainer_review') {{ ['approved' => 'Approved — ready to publish', 'changes_requested' => 'Changes requested'][$course->review_outcome] ?? 'Waiting for a trainer' }} @endif
construction insights person_add edit
@csrf @method('DELETE')
No courses found. Create one.
{{ $courses->links() }}
@endsection