<?php

namespace App\Http\Controllers;

use App\Models\Employee;
use App\Models\Holiday;
use App\Models\LeaveRequest;

class AdminController extends Controller
{
    public function index()
    {
        return view('admin.dashboard', [
            'employees' => Employee::orderBy('name')->get(),
            'holidays' => Holiday::orderBy('date')->get(),
            'leaves' => LeaveRequest::with('employee')->orderByDesc('start_date')->get(),
        ]);
    }
}
