Added: Signin Up, connection to the DB, validator, base controller, base view, environment file, User model
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user