@extends('layouts.master') @section('content')
TimeTable
@foreach ($employees as $employee) @endforeach @php $today = today(); $dates = []; for ($i = 1; $i < $today->daysInMonth + 1; ++$i) { $dates[] = \Carbon\Carbon::createFromDate($today->year, $today->month, $i)->format('Y-m-d'); } @endphp @foreach ($dates as $date) @foreach ($employees as $employee) @php $attd = \App\Models\Attendance::query() ->where('emp_id', $employee->id) ->where('attendance_date', $date) ->first(); @endphp @endforeach @endforeach
Date{{ $employee->name }}
{{ $date }} @if(isset($attd)) @if($attd->status=='1') @else @endif @else @endif
IT:{{date( 'g:ia', strtotime($attd->in_time) )}} OT:{{date( 'g:ia', strtotime($attd->out_time))}} OvT:{{$attd->over_time}} NH:{{$attd->net_hours}}
Absent
NA
@endsection