erandir / plug-route
Route library for php
Installs: 6 921
Dependents: 0
Suggesters: 0
Security: 0
Stars: 49
Watchers: 2
Forks: 9
pkg:composer/erandir/plug-route
Requires
- php: >= 7.4
Requires (Dev)
- phpunit/phpunit: 9.5.21
README
Powerful library for PHP routes
Use the system to work with GET, POST, PUT, DELETE, PATCH and OPTIONS requests.
Work with json, form-data and x-www-form-urlencoded body requests.
Use routes without virtualhost.
Simple and fast.
Install
composer require erandir/plug-route
Basic usage
$route = new \PlugRoute\PlugRoute(); $route->get('/') ->callback(function() { echo 'basic route'; }); $route->run();
See the full documentation
Old version
Install and use an old version, run:
composer require erandir/plug-route:v4.4
Access old documentation for a complete use.