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-07-14 19:14:30 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}!";
});