diff --git a/README.md b/README.md index 23389d1..d1756e3 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 @@ -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()`: