From 9b743e6e57445b1e004cbca367e8465340861186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Sat, 9 Apr 2016 08:05:18 +0200 Subject: [PATCH] [FEATURE] Added requirements (issue: #80) --- README.md | 7 +++++++ composer.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d4197e..604518a 100644 --- a/README.md +++ b/README.md @@ -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() { diff --git a/composer.json b/composer.json index aa22e5d..7468967 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - + "php": ">=5.4.0" }, "require-dev": { "phpunit/phpunit": "4.7.7"