{{ $title }}
@if (count($attendance) > 0) @if ($attendance[0]->mutasi_teacher != null) @php $tgl_mutasi = $attendance[0]->tgl_mutasi; $teacher = \App\Models\Teacher::where('id', $attendance[0]->mutasi_teacher)->first(); @endphp @if ($teacher != null)Previous Teacher was {{ $teacher->name }} stopped at {{ $tgl_mutasi }}
@elseStopped at {{ $tgl_mutasi }}
@endif @endif @endif
@if (session('status'))
@endif
@if (Request::segment(2) == 'edit')
| Nama | @foreach ($attendance as $key => $item){{ date('d/m', strtotime($item->date)) }}
@if ($key < 2)
@if (Request::segment(2) != 'edit')
Edit @endif @endif |
@endforeach
|||||||
|---|---|---|---|---|---|---|---|---|
| {{ $item->name }} | @if (Request::segment(2) == 'edit') @foreach ($attendance as $i) @php $cek = App\Models\AttendanceDetail::where( 'attendance_id', $i->id, )->where('student_id', $item->id); $count = $cek->count(); if ($count == 1 && $cek->first()->is_absent == '1') { $absen = true; } else { $absen = false; } @endphp @if ($count == 1 && $cek->first()->is_absent == '1')@elseif ($count == 1 && $cek->first()->is_permission == true) | @elseif ($count == 1 && $cek->first()->is_alpha == true) | @else | @endif @endforeach @else @foreach ($attendance as $i) @php $cek = App\Models\AttendanceDetail::where( 'attendance_id', $i->id, )->where('student_id', $item->id); $count = $cek->count(); if ($count == 1 && $cek->first()->is_absent == '1') { $absen = true; } else { $absen = false; } @endphp @if ($count == 1 && $cek->first()->is_absent == '1') | @elseif ($count == 1 && $cek->first()->is_permission == true) | @elseif ($count == 1 && $cek->first()->is_alpha == true) | @else | @endif @endforeach @endif |