Added: MVC structure, Router, Views and Controllers for home page and login/signup

This commit is contained in:
2024-12-25 23:02:09 +01:00
parent 7b4b349816
commit 3144078860
17 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
class HomeController {
//private function render($view) {
// ob_start();
// require_once views . $view;
// $content = ob_get_clean();
// require_once views . 'layouts/base.php';
//}
public function index() {
$view = new View();
$data = [
'title' => 'Home'
];
$view->render('home/index', $data);
//require_once views . 'home/index.php';
}
public function home() {
$this->index();
}
}