Manage Courses

Add, update, and oversee the university's academic courses.

@can_do('Plans', 'export') Export to XLSX @endcan_do
@if(session('success'))

{{ session('success') }}

@endif @if($errors->any())

There were some errors with your submission

    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@can_do('Plans', 'add')

Add New Course

@csrf
@endcan_do
@if(request('search') || request('filter_department') || request('filter_coordinator')) @endif

Courses Directory

{{ $courses->count() }} {{ Str::plural('Record', $courses->count()) }}
@php $sortArrow = function($col) use ($sortColumn, $sortDirection) { if ($col !== $sortColumn) return ''; return $sortDirection === 'asc' ? '' : ''; }; $sortUrl = function($col) use ($sortColumn, $sortDirection) { return request()->fullUrlWithQuery(['sort' => $col, 'direction' => ($sortColumn === $col && $sortDirection === 'asc') ? 'desc' : 'asc']); }; @endphp @forelse($courses as $course) @empty @endforelse
ID {!! $sortArrow('id') !!} Code {!! $sortArrow('course_code') !!} Name {!! $sortArrow('course_name_en') !!} Hours {!! $sortArrow('credit_hours') !!} Type Department {!! $sortArrow('department_id') !!} Coordinator {!! $sortArrow('coordinator_id') !!} Description
#{{ str_pad($course->id, 3, '0', STR_PAD_LEFT) }} {{ $course->course_code }}
{{ $course->course_name_en }}
{{ $course->course_name_ar }}
{{ $course->credit_hours }}
@if($course->is_practical) Practical @else Theoretical @endif @if($course->is_general)General@endif
@if($course->department) {{ $course->department->department_name_ar ?: $course->department->department_name_en }} @else Not assigned @endif @if($course->coordinator) {{ $course->coordinator->teacher_name_ar ?: $course->coordinator->teacher_name_en }} @else Not assigned @endif
@can_do('Plans', 'update') @endcan_do @can_do('Plans', 'delete')
@csrf @method('DELETE')
@endcan_do
@if($course->description) @else @endif
No courses found.
@if(method_exists($courses, 'links'))
{{ $courses->links() }}
@endif