Download the PHP package rodri/simple-router without Composer
On this page you can find all versions of the php package rodri/simple-router. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package simple-router
Rodri\SimpleRouter
Router for API applications - It’s a simple route builder that makes it’s process of defining the route far more simple and faster.
Installation
How it works?
Check the wiki: https://github.com/Rod1Andrade/simple-router/wiki
- When instantiate a new Router is necessary set the controller namespace.
- To pass params for a router just name the parameter with
:. for example:/hello/:id, in this case:idis changed to request passed value. - To set a router is necessary start with bar
/, but don't need to finish. - The first parameter of any verb method is an array
[], the first element of array need be the router name. The others have you own associative name, like['middleware' => 'MiddlewareClass']. - Its possible have one or many middlewares to a unique router or a group of routes.
For one middleware use
['middleware' => 'NameMiddlewareClass'], to many use['middleware' => ['OneMiddleware', 'AnotherMiddleware', 'OneMoreMiddleware'].
Example
License
MIT
All versions of simple-router with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0
The package rodri/simple-router contains the following files
Loading the files please wait ...