@extends('layouts.master') @section('css') @endsection @section('content')
@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) @endforeach @csrf @foreach ($employees as $employee) @for ($i = 1; $i < $today->daysInMonth + 1; ++$i) @php $date_picker = \Carbon\Carbon::createFromDate($today->year, $today->month, $i)->format('Y-m-d'); $check_attd = \App\Models\Attendance::query() ->where('emp_id', $employee->id) ->where('attendance_date', $date_picker) ->first(); $check_leave = \App\Models\Leave::query() ->where('emp_id', $employee->id) ->where('leave_date', $date_picker) ->first(); @endphp @endfor @endforeach
Employee Name Employee Position Employee ID {{ $date }}
{{ $employee->name }} {{ $employee->position }} {{ $employee->id }}
@endsection