1. Go to this page and download the library: Download racoon/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/ */
racoon / router example snippets
$router->addRouteFile('/path/to/some_routes.php');
// Tells the router you are done adding routes so as it can process them.
$router->init();
$router
->addRouteFile('/path/to/some_routes.php')
->addRouteFile('/path/to/more_routes.php')
->addRouteFile('/path/to/even_more_routes.php');
// Tells the router you are done adding routes so as it can process them.
$router->init();
$router->addRouteCallable(function($r) {
// Define your routes here as if they were in another file.
// $r->addRoute(), $r->addGroup(), etc are all available.
});