Auth logic is completed (signin, signup, logout), Added: Middlewares, RequireAuth middleware

This commit is contained in:
2024-12-26 14:44:40 +01:00
parent 01b057986e
commit 4c44dac115
11 changed files with 112 additions and 31 deletions

View File

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