Skip to content

Commit

Permalink
Add Laravel 11 example for registring middleware.
Browse files Browse the repository at this point in the history
  • Loading branch information
timvandijck authored Apr 12, 2024
1 parent e12a6a6 commit 53f211c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ return [

This packages provides a middleware which can be added as a global middleware or as a single route.


* Laravel >= 11: *

```php
->withMiddleware(function (Middleware $middleware) {
$middleware->append(\Spatie\HttpLogger\Middlewares\HttpLogger::class);
})
```

* Laravel <= 10: *

```php
// in `app/Http/Kernel.php`

Expand Down

0 comments on commit 53f211c

Please sign in to comment.