Ajoute le News Controller

This commit is contained in:
Colin FRIZOT
2022-11-22 08:47:06 +01:00
parent 86827d1983
commit 53038a5022
3 changed files with 26 additions and 1 deletions

View File

@@ -11,5 +11,6 @@ $loader->register();
$controller = new \Silex\Controller\UserController();
$router = new Router($_SERVER['REQUEST_URI']);
$router->get('/^$/', [$controller, 'index']);
$router->get('/^news\/(?<id>[\w-]+)$/', [$controller, 'viewPost']);
//$router->get('/^inscription$/', [$controller, 'connexion']);
$router->run(new \Silex\DI\DI())->render(__DIR__ . '/../' . VIEW_PATH);