corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
filippo.bertilotti
2024-05-13 bf18c77ec2b3dc1ffdda922e6065108ca5c126eb
src/App/Controllers/products.php
@@ -1,16 +1,25 @@
<?php
namespace App\Controllers;
use App\Models\Product;
use Framework\Viewer;
class Products {
    public function index() {
        require "src/models/product.php";
        $model = new Product;
        $products = $model->getData();
        require "views/products_index.php";
        $viewer = new Viewer;
        echo $viewer->render("products_index.php", [
            "products"=> $products
        ]);
    }
    public function show() {
    public function show(string $id) {
        var_dump($id);
        require "views/products_show.php";
    }
    public function showPage(string $title, string $id, string $page) {
        echo $title, " ", $id, " ", $page;
    }
}