1. Go to this page and download the library: Download sharpdressedcodes/keletos 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/ */
sharpdressedcodes / keletos example snippets
use Keletos\Component\Routing\Router;
use Application\Controller\Main as MainController;
Router::match(['GET', 'POST'], '/', MainController::class);
Router::get('/test/{id<\d+>?1}', function($id = -1) {
echo 'no controller!!! ' . $id;
});
Router::get('/user/{name<\w+>}', function($name) {
echo "name is $name";
}, [
'