From cc28c8d37ac6c61e5e9b8afafb8516cad88c83df Mon Sep 17 00:00:00 2001 From: tp_dhu Date: Tue, 25 Mar 2025 09:13:57 +0000 Subject: [PATCH] dashboard and home now extending BaseController --- app/controllers/DashboardController.php | 8 +++++--- app/controllers/HomeController.php | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index f7d8948..1bc60c3 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -1,9 +1,11 @@ set('content', '../ui/views/dashboard.html'); - echo \Template::instance()->render('../ui/templates/layout.html'); + + $this->requireLogin(); + + $this->renderView('/ui/views/dashboard.html'); } } \ No newline at end of file diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 9ee17eb..89cc3ea 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -1,12 +1,11 @@ set('content', '/ui/views/home.html'); + $this->renderView('/ui/views/home.html'); - echo \Template::instance()->render('../ui/templates/layout.html'); } // ... } \ No newline at end of file