index.php | ●●●●● patch | view | raw | blame | history | |
show.php | ●●●●● patch | view | raw | blame | history | |
src/controllers/products.php | ●●●●● patch | view | raw | blame | history |
index.php
@@ -2,4 +2,12 @@ require "src/controllers/products.php"; $controller = new Products; $action = $_GET["action"]; if($action === "index") { $controller->index(); }elseif($action === "show") { $controller->show(); } show.php
File was deleted src/controllers/products.php
@@ -2,9 +2,9 @@ class Products { public function index() { require "model.php"; require "src/models/product.php"; $model = new Model; $model = new Product; $products = $model->getData(); require "views/products_index.php";