From 7fac1dc1ccd0a5209acd8aecd23595e5d9077c44 Mon Sep 17 00:00:00 2001 From: odan Date: Sun, 31 May 2020 01:16:55 +0200 Subject: [PATCH] Update readme --- README.md | 51 ++++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index ccf5dec..f08774f 100644 --- a/README.md +++ b/README.md @@ -118,35 +118,7 @@ it into a nice JSON response. #### Slim 4 integration -```php -add(new ValidationExceptionMiddleware( - $app->getResponseFactory(), - new ErrorDetailsResultTransformer(), - new JsonEncoder() -)); - -// If you are using a container, you can also use this option: -// $app->add(ValidationExceptionMiddleware::class); - -// ... - -$app->run(); -``` - -### Container definition - -This example uses PHI-DI: +Insert a container definition for `ValidationExceptionMiddleware::class`: ```php add(ValidationExceptionMiddleware::class); + +// ... + +$app->run(); +``` + #### Usage ```php