@extends('admin::layouts.plane_std_att') @section('page_heading') {{$title}} @endsection @section('content')
{{ Form::open(array('url' => 'StdAttendance', 'method' => 'post')) }} {{ csrf_field() }}
{{ Form::select('class', $class_arr, $class, ['placeholder' => '- Select Class -', 'class' => 'form-control', 'id' => 'class_section', 'required' => '']) }}
{{ Form::select('section', $section_arr, $section, ['placeholder' => '- All Section -', 'class' => 'form-control', 'id' => 'section']) }}
{{ Form::select('order_by', ["Student Name"=>"Student Name","Admission No"=>"Admission No"], $order_by, ['placeholder' => '- Select Order By-', 'class' => 'form-control', 'id' => 'order_by', 'required' => '']) }}
{{ Form::text('date', $date, array('class' => 'form-control', 'placeholder' => "dd/mm/yy", 'id' => 'visit_date', 'required' => '')) }}
{{ Form::close() }}


@if(session()->has('message'))
{{ session()->get('message') }} {{ session()->forget('message') }}
@endif @if(count($studList) > 0) {{ Form::open(array('url' => '/StdAttendance/manageAttendencePost', 'method' => 'post', 'autocomplete' => 'off','id'=>'attendanceForm')) }} {{ Form::hidden('date', $date, array('class' => 'form-control', 'placeholder' => "", 'id' => 'visit_date')) }}
@php $students_data = ''; // To store student IDs for processing $i = 1; $current_section = null; // Track current section for display $sections = collect($studList)->groupBy('section'); // Group students by section @endphp @foreach($sections as $section => $students)
Class: {{ $arrClasses[$val->current_class] }}-{{ $section }}
@php $chunks = array_chunk($students->all(), 5); @endphp @foreach($chunks as $index => $chunk)
@foreach($chunk as $val)
{{ $i }}. {{ ucfirst($val->first_name) }} {{ $val->last_name }} - {{ $val->admission_no }}
@php $students_data .= ',' . $val->id; $i++; @endphp
@endforeach
@endforeach @endforeach
{{ Form::close() }} @endif

@endsection