@extends('layouts.master') @section('content')
Employee Name | Employee Position | Employee ID | @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){{ $date }} | @endforeach
---|---|---|---|
{{ $employee->name }} | {{ $employee->position }} | {{ $employee->id }} | @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
@if (isset($check_attd))
@if ($check_attd->status==1)
@else
@endif
@else
@endif
@if (isset($check_leave))
@if ($check_leave->status==1)
@else
@endif
@else
@endif
|
@endfor