<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\LokasiTps;
use App\Models\AduanTps;
use App\Models\Sampah;

class DashboardController extends Controller
{
    public function index()
    {
        $totalTps = LokasiTps::count();
        $totalAduan = AduanTps::count();
        $sampahTerbaru = Sampah::orderBy('created_at', 'desc')->first();

        return view('admin.index', compact(
            'totalTps',
            'totalAduan',
            'sampahTerbaru'
        ));
    }
}
