corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
filippo.bertilotti
2024-05-13 1e50937ba013dbd233c73fd9c349d41f41a09c34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
namespace App\Controllers;
use App\Models\Product;
class Products {
    public function index() {
 
        $model = new Product;
        $products = $model->getData();
 
        require "views/products_index.php";
    }
 
    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;
    }
}