@php $div = isset($div) ? $div : 'col-lg-4'; $mt = isset($mt) ? $mt : 'mb-15'; $subject = isset($subject) ? true : false; $required = $required ?? []; $selected = isset($selected) ? $selected : null; $academic_year = $selected && isset($selected['academic_year']) ? $selected['academic_year'] : null; $class_id = $selected && isset($selected['class_id']) ? $selected['class_id'] : null; $section_id = $selected && isset($selected['section_id']) ? $selected['section_id'] : null; $subject_id = $selected && isset($selected['subject_id']) ? $selected['subject_id'] : null; $student_id = $selected && isset($selected['student_id']) ? $selected['student_id'] : null; if ($academic_year) { $classes = classes($academic_year) ?? null; $sections = $class_id ? sections($class_id, $academic_year) : null; $subjects = $class_id && $section_id ? subjects($class_id, $section_id, $academic_year) : null; $students = $class_id && $section_id ? students($class_id, $section_id, $academic_year) : null; } else { $sections = $class_id ? sections($class_id) : null; $subjects = $class_id && $section_id ? subjects($class_id, $section_id) : null; } $visiable = $visiable ?? []; @endphp @if (in_array('academic', $visiable))
@if ($errors->has('academic_year')) {{ $errors->first('academic_year') }} @endif
@endif @if (in_array('class', $visiable))
loader
{{ $errors->first('class_id') }}
@endif @if (in_array('section', $visiable))
@if ($errors->has('section_id')) {{ $errors->first('section_id') }} @endif
@endif @if (in_array('subject', $visiable))
@if ($errors->has('subject_id')) {{ $errors->first('subject_id') }} @endif
@endif @if (in_array('student', $visiable))
loader
@if ($errors->has('student')) {{ $errors->first('student') }} @endif
@endif @push('script') @endpush