<?php

namespace App\Http\Controllers;

use App\Models\Sampah;
use App\Models\KategoriTps;
use App\Models\LokasiTps;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    public function index()
    {
        $sampah = Sampah::orderBy('tahun', 'desc')->first();
        $kategoriTps = KategoriTps::orderBy('id_kategori_tps')->get();
        $lokasiTps = LokasiTps::all();

        return view('user.index', compact('sampah', 'kategoriTps', 'lokasiTps'));
    }
}
