@extends('layouts.app') @section('title', $course->title) @section('content') @php $isArtisan = $course->type === 'artisan'; $gradient = $isArtisan ? 'from-amber-950 via-amber-900 to-amber-700' : 'from-green-950 via-green-900 to-green-700'; $lc = strtolower($course->title); $icon = match(true) { str_contains($lc, 'business') => '๐Ÿ“Š', str_contains($lc, 'information') || str_contains($lc, 'it') => '๐Ÿ’ป', str_contains($lc, 'welding') => '๐Ÿ”ง', str_contains($lc, 'electrical') => 'โšก', str_contains($lc, 'building') || str_contains($lc, 'construct') => '๐Ÿ—', str_contains($lc, 'plumbing') => '๐Ÿช›', $isArtisan => '๐Ÿ”จ', default => '๐Ÿ“‹', }; @endphp {{-- HERO --}}
{{-- Breadcrumb --}}
Home โ€บ Courses โ€บ {{ $course->title }}
{{-- Left: course info --}}
{{ ucfirst($course->type) }} Programme

{{ $course->title }}

{{ $course->description }}

{{-- Quick stats --}}
{{ $course->duration_weeks }}
Weeks
KES {{ number_format($course->fee) }}
Enrollment Fee
Online
Mode
{{-- Right: enrollment card (shown in hero column) --}}
{{ $icon }}
Course Fee
KES {{ number_format($course->fee) }}
Duration {{ $course->duration_weeks }} Weeks
Level {{ $isArtisan ? 'Artisan / Trade' : 'Diploma' }}
Mode Online / Flexible
Certificate โœ“ Nationally Recognized
@auth
@csrf
@else Sign In to Enroll

No account? Register free โ†’

@endauth
{{-- DETAIL SECTION --}}
{{-- Left: about the course --}}
{{-- Flash messages --}} @if(session('success'))
โœ“ {{ session('success') }}
@endif @if(session('error'))
โœ• {{ session('error') }}
@endif
About This Programme

What You'll Learn

{{ $course->description }} This programme is designed to give you hands-on, practical skills that are in demand across Kenya and the wider region. Upon completion, you will receive a nationally recognized {{ ucfirst($course->type) }} certificate.

{{-- Programme highlights --}}
@foreach([ ['icon' => '๐ŸŽฏ', 'title' => 'Practical Skills', 'desc' => 'Hands-on training with real-world application'], ['icon' => '๐Ÿ†', 'title' => 'Recognized Certificate', 'desc' => 'Nationally accredited upon completion'], ['icon' => 'โฑ', 'title' => 'Flexible Learning', 'desc' => 'Study at your own pace, online'], ['icon' => '๐Ÿ‘จโ€๐Ÿซ', 'title' => 'Expert Instructors', 'desc' => 'Guidance from experienced professionals'], ] as $highlight)
{{ $highlight['icon'] }}
{{ $highlight['title'] }}
{{ $highlight['desc'] }}
@endforeach
{{-- Curriculum / Units by Semester --}} @if($course->units->count()) @php $unitsBySemester = $course->units->groupBy('semester'); @endphp
Course Curriculum

Programme Structure

@foreach($unitsBySemester as $semNum => $units)
@endforeach
@endif {{-- Programme details table --}}

Programme Details

@foreach([ ['label' => 'Programme Title', 'value' => $course->title], ['label' => 'Type', 'value' => ucfirst($course->type) . ' Programme'], ['label' => 'Duration', 'value' => $course->duration_weeks . ' Weeks'], ['label' => 'Mode of Study', 'value' => 'Online / Flexible Schedule'], ['label' => 'Enrollment Fee', 'value' => 'KES ' . number_format($course->fee)], ['label' => 'Award', 'value' => ($isArtisan ? 'Artisan Certificate' : 'Diploma Certificate') . ' (Nationally Recognized)'], ] as $row)
{{ $row['label'] }} {{ $row['value'] }}
@endforeach
{{-- Right: sticky enrollment sidebar --}}
Enrollment Fee
KES {{ number_format($course->fee) }}
โœ“ {{ $course->duration_weeks }}-week programme
โœ“ Online, self-paced learning
โœ“ Nationally recognized certificate
โœ“ Instant digital certificate on completion
โœ“ Expert instructor support
@auth
@csrf
@else Sign In to Enroll

New student? Register free โ†’

@endauth

โœฆ Secure enrollment ยท Instant access

{{-- Back link --}} โ† Back to All Courses
@endsection