12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- $router = $di->getRouter();
- // Define your routes here
- $router->handle($_SERVER['REQUEST_URI']);
- $router->add('/',[
- 'controller' => 'index',
- 'action' => 'index',
- ]);
- $router->add('/:controller/:action/:params',[
- 'controller' => 1,
- 'action' => 2,
- 'params' => 3
- ]);
- $router->add('/:controller',[
- 'controller' => 1,
- 'action' => 'index'
- ]);
- $router->add('/gogs/:params',[
- 'controller'=>'gogs',
- 'action'=>'index',
- 'params'=>1
- ]);
- $router->notFound([
- 'controller' => 'index',
- 'action' => 'show404',
- ]);
|