mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 02:30:09 +03:00
25 lines
504 B
PHP
25 lines
504 B
PHP
<?php
|
|
|
|
/**
|
|
* Custom router which handles default middlewares, default exceptions and things
|
|
* that should be happen before and after the router is initialised.
|
|
*/
|
|
|
|
namespace Demo;
|
|
|
|
use Pecee\SimpleRouter\SimpleRouter;
|
|
|
|
class Router extends SimpleRouter {
|
|
|
|
public static function start($defaultNamespace = null) {
|
|
|
|
// change this to whatever makes sense in your project
|
|
require_once 'routes.php';
|
|
|
|
// Do initial stuff
|
|
|
|
parent::start('\\Demo\\Controllers');
|
|
|
|
}
|
|
|
|
} |