mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
[FEATURE] Added requirements (issue: #80)
This commit is contained in:
@@ -8,6 +8,10 @@ Add the latest version of Simple PHP Router running this command.
|
||||
composer require pecee/simple-router
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 5.4 or greater
|
||||
|
||||
## Notes
|
||||
|
||||
The goal of this project is to create a router that is 100% compatible with the Laravel documentation, but as simple as possible and as easy to integrate and change as possible.
|
||||
@@ -62,6 +66,9 @@ use Pecee\SimpleRouter\SimpleRouter;
|
||||
* the request, for instance if a user is not authenticated.
|
||||
*/
|
||||
|
||||
// Add CSRF support (if needed)
|
||||
SimpleRouter::csrfVerifier(new \Pecee\Http\Middleware\BaseCsrfVerifier());
|
||||
|
||||
SimpleRouter::group(['prefix' => 'v1', 'middleware' => '\MyWebsite\Middleware\SomeMiddlewareClass'], function() {
|
||||
|
||||
SimpleRouter::group(['prefix' => '/services', 'exceptionHandler' => '\MyProject\Handler\CustomExceptionHandler'], function() {
|
||||
|
||||
Reference in New Issue
Block a user