Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()`:

Expand Down