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;