Added: Signin Up, connection to the DB, validator, base controller, base view, environment file, User model

This commit is contained in:
2024-12-26 02:00:33 +01:00
parent d7b8aba072
commit 5bca9b12aa
9 changed files with 338 additions and 27 deletions

View File

@ -0,0 +1,23 @@
<?php
class Controller {
/**
* Redirect to a given URL
*
* @param string $url
*/
public function redirect($url) {
header("Location: $url");
exit();
}
/**
* Render a view
*
* @param string $viewName
* @param array $data
*/
public function view($viewName, $data = []) {
$view = new View();
$view->render($viewName, $data);
}
}