Skip to content

Commit 271016d

Browse files
AdewagoldTucker-Eric
authored andcommitted
Readme Update (Tucker-Eric#6)
* Update README.md * Update README.md
1 parent 054e67c commit 271016d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In `app/Http/Kernel.php`
2828
```
2929

3030
### Applying the middleware to routes
31-
Add the middleware to your as desired
31+
Add the middleware to your route as desired
3232

3333
#### Controller Middleware
3434
```php
@@ -47,7 +47,9 @@ class MyController extends Controller
4747
Route::post('my-api-endpoint', 'MyOtherController@store');
4848
});
4949
```
50-
50+
```php
51+
Route::post('my-api-endpoint', 'MyOtherController@store')->middleware('xml');
52+
```
5153
### Accessing XML Input With Middleware
5254
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()`:
5355

0 commit comments

Comments
 (0)