{{-- HEADER SECTION --}}

{{ $class->name }}

Total Siswa

{{ $studentCount }}

{{-- SUBJECT LIST SECTION --}}

Daftar Mata Pelajaran

{{ count($modules) }} Mapel
@foreach($modules as $module) @php $teacher = $module->teachers->first(); $teacherName = $teacher?->user?->name ?? 'Belum ada guru'; $initials = collect(explode(' ', $teacherName)) ->map(fn($n) => substr($n, 0, 1)) ->take(2) ->join(''); @endphp
{{-- Thumbnail Module --}}
@if($module->thumbnail) {{ $module->title }} @else
@endif
{{ $module->code }}
{{-- Content --}}

{{ $module->title }}

@php $msc = $module->moduleStudentClasses ->where('student_class_id', $class->id) ->first(); $teacher = $msc?->teacher; $teacherName = $teacher?->user?->name ?? 'Belum ada guru'; $initials = collect(explode(' ', $teacherName)) ->map(fn($n) => substr($n, 0, 1)) ->take(2) ->join(''); @endphp {{-- Avatar Teacher --}}
@if($teacher && $teacher->photo) @else
{{ $initials }}
@endif

Pengampu

{{ $teacherName }}

Daftar Quiz & Ujian
@endforeach