johannmalmcom / router
A simple router for rest API:s and web servers
Installs: 12
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/johannmalmcom/router
This package is auto-updated.
Last update: 2025-11-17 01:28:35 UTC
README
require_once("./vendor/Route.php"); use Router\Route; // Ordinary Route::get("/", function() { return "Hello, world"; }); Route::post("/", function() { return "Hello, post"; }); Route::put("/", function() { return "Hello, put"; }); Route::delete("/", function() { return "Hello, delete"; }); // Wildcard Route::get("/wildcard/:id", function() { return "Wildcard"; }); // Secret Route::get("/secret", function() { return "Secret"; }, function() { return false; });