Qubus router is a powerful and fast PHP router for PSR-7/PSR-15 messages.
- Basic routing (
GET
,HEAD
,POST
,PUT
,PATCH
,UPDATE
,DELETE
) with support for custom multiple HTTP verbs. - Regular expression constraints for parameters.
- Named routes.
- Generating url to routes.
- Route parameters.
- Optional route parameters.
- Route groups.
- PSR-7/PSR-15 Middlewares (classes that intercepts before the route is rendered) for routes, groups and controllers.
- Responsable objects.
- Domain/Subdomain routing
- Custom boot managers to rewrite urls
- Option to load routes from JSON file
- and more . . .
- PHP 8.2+
composer require qubus/router
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
</IfModule>
location / {
try_files $uri /index.php;
}