@extends('layouts.app') @section('title', 'Presensi Siswa') @section('content')
{{-- Header --}}

Presensi Siswa

Pencatatan kehadiran siswa per jam pelajaran

{{-- Quick Stats --}} @php $today = now()->toDateString(); $todayAlpha = \App\Models\Attendance::where('date', $today)->where('status', 'alpha')->count(); $todayTotal = \App\Models\Attendance::where('date', $today)->count(); $monthTotal = \App\Models\Attendance::whereMonth('date', now()->month)->whereYear('date', now()->year)->count(); $monthAlpha = \App\Models\Attendance::whereMonth('date', now()->month)->whereYear('date', now()->year)->where('status', 'alpha')->count(); $recentDates = \App\Models\Attendance::select('date') ->distinct() ->orderByDesc('date') ->take(10) ->get(); @endphp

Presensi Hari Ini

{{ $todayTotal }}

data tercatat

Alpha Hari Ini

{{ $todayAlpha }}

tanpa keterangan

Bulan Ini

{{ $monthTotal }}

total presensi

Alpha Bulan Ini

{{ $monthAlpha }}

pelanggaran

{{-- Recent --}}

Riwayat Presensi

10 hari terakhir

@if($recentDates->count() > 0) @else

Belum Ada Presensi

Klik "Input Presensi" untuk memulai

@endif
@endsection