commit | author | age
|
026ec0
|
1 |
<?php |
c042bc
|
2 |
namespace App\Controllers; |
5cc38b
|
3 |
use App\Models\Product; |
c54720
|
4 |
class Products { |
026ec0
|
5 |
public function index() { |
be68f1
|
6 |
|
5cc38b
|
7 |
$model = new Product; |
026ec0
|
8 |
$products = $model->getData(); |
F |
9 |
|
3d470d
|
10 |
require "views/products_index.php"; |
026ec0
|
11 |
} |
2e7bc3
|
12 |
|
a93a2f
|
13 |
public function show(string $id) { |
F |
14 |
var_dump($id); |
2e7bc3
|
15 |
require "views/products_show.php"; |
F |
16 |
} |
1f822b
|
17 |
|
F |
18 |
public function showPage(string $title, string $id, string $page) { |
1e5093
|
19 |
echo $title, " ", $id, " ", $page; |
1f822b
|
20 |
} |
026ec0
|
21 |
} |