From 740a4ae436605330f6f0e0204416491d770a5a14 Mon Sep 17 00:00:00 2001 From: Adewale Adeleye Date: Tue, 15 May 2018 14:32:25 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 23389d1..b0da433 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ In `app/Http/Kernel.php` ``` ### Applying the middleware to routes -Add the middleware to your as desired +Add the middleware to your route as desired #### Controller Middleware ```php From ca95ab55a3f26f471644a332b021b55ff704ec01 Mon Sep 17 00:00:00 2001 From: Adewale Adeleye Date: Tue, 15 May 2018 14:33:53 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0da433..d1756e3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ class MyController extends Controller Route::post('my-api-endpoint', 'MyOtherController@store'); }); ``` - +```php + Route::post('my-api-endpoint', 'MyOtherController@store')->middleware('xml'); +``` ### Accessing XML Input With Middleware If you are using the middleware it will automatically inject the xml into the request as an array and you you can access the xml data in your controller with the `$request->all()`: