sugatasei/bredala-router

PHP object-oriented layer for the HTTP specification

3.0.0 2024-08-14 15:34 UTC

This package is auto-updated.

Last update: 2025-06-14 19:04:55 UTC


README

Fast request router for PHP.

use Bredala\Router\Router;

$router = new Router();
$router->add('GET', '/', function() {
    echo 'home';
});

$router->add('GET', '/hello/([^/]+)', function(string $world) {
    echo "Hello {$world}!";
});