[FEATURE] Added requirements (issue: #80)

This commit is contained in:
Simon Sessingø
2016-04-09 08:05:18 +02:00
parent 457dbc5710
commit 9b743e6e57
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -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() {