1. Go to this page and download the library: Download sugatasei/bredala-router library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sugatasei / bredala-router example snippets
// $method absent -> CallableRoute, $controller est utilisé comme callable
$router->get('/ping', fn() => 'pong');
$router->get('/ping', [$service, 'method']);
// $method présent -> ControllerRoute, instanciée au moment de l'exécution
$router->get('/user/{id}', UserController::class, 'show');