mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 20:02:13 +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
|
composer require pecee/simple-router
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- PHP 5.4 or greater
|
||||||
|
|
||||||
## Notes
|
## 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.
|
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.
|
* 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' => 'v1', 'middleware' => '\MyWebsite\Middleware\SomeMiddlewareClass'], function() {
|
||||||
|
|
||||||
SimpleRouter::group(['prefix' => '/services', 'exceptionHandler' => '\MyProject\Handler\CustomExceptionHandler'], function() {
|
SimpleRouter::group(['prefix' => '/services', 'exceptionHandler' => '\MyProject\Handler\CustomExceptionHandler'], function() {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
|
"php": ">=5.4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "4.7.7"
|
"phpunit/phpunit": "4.7.7"
|
||||||
|
|||||||
Reference in New Issue
Block a user