@extends('layouts.admin') @section('header')

📊 Admin Dashboard

@endsection @section('content')

Welcome back, {{ auth()->user()->name }}!

Here's your administrative overview

@php $employee = \App\Models\Employee::where('user_id', auth()->id())->first(); @endphp @if($employee)
🆔 Employee No: {{ $employee->employee_no }}
@endif

Quick Stats

Total Employees
{{ \App\Models\Employee::count() }}
Pending Leave Requests
{{ \App\Models\Leave::where('status', 'Pending')->count() }}
Today's Attendance
{{ \App\Models\Attendance::whereDate('attendance_date', today())->count() }}

Quick Actions

👤 Add New Employee
Register a new team member
📋 Review Leave Requests
Approve or manage requests
@if(\App\Models\Leave::where('status', 'Pending')->exists())

🔔 Recent Leave Requests

@foreach(\App\Models\Leave::where('status', 'Pending')->latest()->take(5)->get() as $leave) @endforeach
Employee Leave Type Date Range Status
{{ $leave->user->name }} {{ $leave->leave_type }} {{ \Carbon\Carbon::parse($leave->start_date)->format('M d') }} - {{ \Carbon\Carbon::parse($leave->end_date)->format('M d, Y') }} Pending
@endif @endsection