<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class AnfController extends Controller
{
    public function show($category, $size)
    {
        // URL decoding for spaces/slashes
        $category = urldecode($category);
        $size = urldecode($size);

        $data = DB::table('anf_anfds')
            ->where('category', $category)
            ->where('size', $size)
            ->orderBy('id')
            ->get();

        return view('anf.index', compact('category', 'size', 'data'));
    }
}
