A lightweight php routing service for writing fullstack applications in PHP.
Make sure you are using php version >= 8.0.1
composer require bernard-arhia/routee
index.php
use Http\Router;
require_once __DIR__ . "/vendor/autoload.php";
$router = new Router;
$router->get("/", function(){
echo "Hello world";
});
$router->run();
Now open the terminal and start your php web server
php -S localhost:9000
This will start the php server on port 9000 In your browser open http://localhost:9000 to preview the example
The Route accepts the following http request methods