From 8fdeaaff9e2e6862cb3c9825522b51453a0340f6 Mon Sep 17 00:00:00 2001 From: filippo.bertilotti <filippobertilotti@gmail.com> Date: Mon, 13 May 2024 11:55:19 +0200 Subject: [PATCH] riorganizzazione views e refactor code per utilizzo nuova classe viewer (parte 77) --- src/App/Controllers/products.php | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App/Controllers/products.php b/src/App/Controllers/products.php index 4e76a58..95ab1d5 100644 --- a/src/App/Controllers/products.php +++ b/src/App/Controllers/products.php @@ -15,8 +15,10 @@ } public function show(string $id) { - var_dump($id); - require "views/products_show.php"; + $viewer = new Viewer; + echo $viewer->render("Products/show.php", [ + "id"=> $id + ]); } public function showPage(string $title, string $id, string $page) { -- Gitblit v1.8.0