@extends('layouts.user') @section('title', 'Attendance') @section('page-icon', 'calendar-check') @section('content')
@php $totalDays = $attendance->count(); $presentDays = $attendance->where('status', 'Present')->count(); $absentDays = $attendance->where('status', 'Absent')->count(); $lateDays = $attendance->where('status', 'Late')->count(); @endphp {{-- Stats --}}
{{ $totalDays }}
Total
{{ $presentDays }}
Present
{{ $absentDays }}
Absent
{{ $lateDays }}
Late
{{-- Main Table --}}

Attendance

@csrf
@csrf
@forelse($attendance as $key => $row) @empty @endforelse
S.NoDateCheck InCheck OutWorking HoursStatus
{{ $key + 1 }} {{ \Carbon\Carbon::parse($row->attendance_date)->format('d M Y') }} {{ $row->check_in ?? '—' }} {{ $row->check_out ?? '—' }} {{ $row->working_hours ?? '—' }} @php $s = strtolower($row->status ?? ''); @endphp {{ $row->status ?? '—' }}
No records found
@endsection