1. Go to this page and download the library: Download foca/nexus-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/ */
foca / nexus-router example snippets
public const ENABLE_ROUTES_FILE = true; // Cargar rutas desde routes.php
// public const ENABLE_ROUTES_FILE = false; // No cargar rutas desde routes.php
// Ruta simple
Router::get('/users' , 'Controllers/User');
// Ruta con parámetro
Router::get('/users/$list', 'Controllers/User');
// Ruta con parámetro y valor inyectado
Router::get('/users/$list', 'Controllers/User', "getUsers");