{!! Form::open(['method' => 'POST']) !!}
{!! Form::close() !!}
@if (isset($attendances) && $attendances->count())
@if(isset($attendances) && $attendances->count())
@push('script')
@endpush
@else
@lang('No Related Data Found.')
@endif
@endisset
{!! Form::label('section', trans('Section'), ['class' => 'control-label']) !!}
{!! Form::select('section', $pluckSection , $section?? null , ['class' => 'select2 form-control','required','placeholder'=>'Choose']) !!}
@error('section')
{{ $message }}
@enderror
{!! Form::label('month', trans('Month'), ['class' => 'control-label']) !!}
{!! Form::selectMonth('month' , $month??(date('n',strtotime(now()))) , ['class' => 'form-control']) !!}
@error('month')
{{ $message }}
@enderror
{!! Form::label('year', trans('Year'), ['class' => 'control-label']) !!}
{!! Form::selectRange('year', date('Y'), 2000 , $year ?? (date('Y',strtotime(now()))) , ['class' => 'form-control']) !!}
@error('year')
{{ $message }}
@enderror
@lang('Print')
@endif
@isset($attendances)
@foreach($attendances as $key => $attendance)
@foreach ($attendance as $field=> $value)
@if ($field == 'classname')
{{trans(school('country')->code == 'BD' ? 'Class' : 'Grade')}}
- {{$value}}
@elseif ($field == 'section_number')
@lang('Section')
- {{$value}}
@endif
@if ( $field == 'exam_name') @lang('Exam')
- {{$value}}
@endif
@php $print = true; @endphp
@endforeach
@break($loop->first)
@endforeach
@lang('Attendance Report') {{date("F", strtotime($month)).', '.$year}}
| # | @foreach($attendances as $key => $attendance) @foreach ($attendance as $field=> $value) @if ($field == 'classname' || $field == 'exam_name'|| $field == 'section_number') @elseif($field =='totalP')@lang('Total') @lang('Present') |
@elseif($field =='totalA')
@lang('Total') @lang('Absent') |
@elseif($field =='student_code')
@lang('Student Id') | @elseif($field =='name')@lang('Name') | @else@lang($field) | @endif @endforeach @break($loop->first) @endforeach
|---|---|---|---|---|---|
| {{$loop->index +1}} | @foreach ($attendance as $field => $value) @if ($field == 'classname' || $field == 'exam_name'|| $field == 'section_number') @elseif($field =='totalP' || $field =='student_code'|| $field =='name' || $field =='totalA'){{$value}} | @else@if ($value == null) @elseif ($value == 0) A @elseif ($value == 1) P @elseif ($value == 2) E @endif {{--{{$value == null ? '' : ($value == 1 ? 'P' : ($value == 0 ? 'A': 'E'))}}--}} | @endif @endforeach
----------------------
@lang('Class Teacher')
----------------------
@lang('Head Teacher')