@extends('layouts.school') @section('title', 'Promote Students') @section('header', 'Promote Students') @section('content')
@if(request('from_class_id')) @php $sourceClass = $classes->firstWhere('id', (int) request('from_class_id')); $students = \App\Models\Student::where('school_id', \App\Services\Tenant\TenantContext::getSchoolId()) ->where('class_id', request('from_class_id')) ->where('is_active', true) ->orderBy('first_name') ->get(); @endphp

{{ $students->count() }} active student(s) in {{ $sourceClass?->name }}

@csrf
@forelse($students as $student) @empty @endforelse
Name Admission No
{{ $student->full_name }} {{ $student->admission_no }}
No active students in this class.
@if($students->count())
@endif
@endif @endsection