<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CategoryController extends Controller
{
    public function index()
    {
        //Json
        $path = public_path('products.json');
        // Leer y decodificar
        $json = file_get_contents($path);
        $products = json_decode($json, true);
        $currentView = "";

        return view('index',compact('products', 'currentView'));
    }
}
