updated defaults from examples

This commit is contained in:
2024-09-27 12:58:19 -07:00
parent 7cd3071905
commit 0d4b62ffb9
10 changed files with 37 additions and 8 deletions

View File

@@ -19,7 +19,12 @@ class Router {
}
private function loadRoutes() {
require_once( BASEPATH . '/App/routes.php');
// Check if Path exists
if (file_exists(BASEPATH . '/App/routes.php')) {
require_once( BASEPATH . '/App/routes.php');
} else {
require_once(FRAMEWORKPATH . '/defaults/App/routes.php');
}
return $routes;
}
@@ -104,9 +109,13 @@ class Router {
if (file_exists($cp)) {
return $cp;
} else {
return BASEPATH . '/App/controllers/404.php';
//Check if 404 exits
if (file_exists(BASEPATH . '/App/controllers/404.php')) {
return BASEPATH . '/App/controllers/404.php';
} else {
return FRAMEWORKPATH . '/defaults/App/controllers/404.php';
}
}
}
public function debug() {