From 7092a28400e63895c1f69cb78a3ceab99ac1aa48 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 12 Sep 2025 19:07:43 -0400 Subject: [PATCH] this->view --- protected/src/controllers/app/home_ctrl.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/protected/src/controllers/app/home_ctrl.php b/protected/src/controllers/app/home_ctrl.php index 3b42aab..30f6555 100644 --- a/protected/src/controllers/app/home_ctrl.php +++ b/protected/src/controllers/app/home_ctrl.php @@ -46,9 +46,8 @@ class home_ctrl extends base_controller { public function name_demo(): Response { echo $this->footer; - $view = new \CodeHydrater\view(); - $view->set('twig_data', ['name' => "John Doe"]); - $content = $view->fetch($this, "app/test", ViewType::TWIG); + $this->view->set('twig_data', ['name' => "John Doe"]); + $content = $this->view->fetch($this, "app/test", ViewType::TWIG); $this->response->set_content($content); return $this->response;