@extends('layouts.app') @section('title', 'My Classes') @section('content') @if ($classes->isEmpty()) @else @php $grads = ['from-emerald-500 to-green-600','from-sky-500 to-blue-600','from-violet-500 to-purple-600','from-amber-500 to-orange-600','from-rose-500 to-pink-600','from-teal-500 to-cyan-600']; @endphp
@foreach ($classes as $i => $c) @php $g = $grads[$i % count($grads)]; $initial = strtoupper(substr($c->subject->Subject_name ?? 'C', 0, 1)); @endphp
{{ $initial }}

{{ $c->subject->Subject_name ?? '—' }}

{{ $c->teacher->displayName() ?? '—' }}
{{ $c->section->Section_name ?? '' }} {{ $c->published_lesson_count }} lesson{{ $c->published_lesson_count === 1 ? '' : 's' }}
@endforeach
@endif @endsection