@extends('layouts.frontendlayout') @section('content')

My Course Schedule

Viewing schedule for: {{ Auth::user()->name }}

{{-- Basic filter/selector for semester (if applicable) --}}
@if ($scheduledCourses->isEmpty())
You are not currently enrolled in any courses for the selected semester.
@else
@foreach ($scheduledCourses->sortBy('pivot.start_time') as $course) {{-- Assuming a pivot table with schedule details --}} {{-- e.g., 'Monday', 'T/Th', 'MWF' --}} {{-- e.g., 'Building A, Room 101' --}} {{-- Assuming you fetch this or define it --}} @endforeach
Course Code Course Name Instructor Day(s) Time Location Semester
{{ $course->code }} {{ $course->name }} @if ($course->instructors->isNotEmpty()) {{ $course->instructors->pluck('name')->join(', ') }} @else N/A @endif {{ $course->pivot->day_of_week }} {{ \Carbon\Carbon::parse($course->pivot->start_time)->format('h:i A') }} - {{ \Carbon\Carbon::parse($course->pivot->end_time)->format('h:i A') }} {{ $course->pivot->location }}{{ $course->pivot->semester_name ?? 'N/A' }}
@endif
@endsection