fixed up router

This commit is contained in:
2024-09-06 12:45:37 -07:00
parent 713a44ad98
commit 0c96ba6c90
3 changed files with 159 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
<?php
require_once(BASEPATH . '/vendor/autoload.php');
require_once(BASEPATH . '/App/config.php');
//Twig
function view($name = '', $data = [] ) {
@@ -17,7 +18,12 @@ function view($name = '', $data = [] ) {
}
}
// Load Database Class
require_once(BASEPATH . '/vendor/4lt/novaconium/src/Database.php');
$db = new Database($config['database']);
// Load a controller
require_once('Router.php');
require_once(BASEPATH . '/vendor/4lt/novaconium/src/Router.php');
$router = new Router();
//$router->debug();
require_once($router->controllerPath);