Skip to content

Commit

Permalink
Update installation instructions for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfietje committed Mar 14, 2024
1 parent de4d703 commit 74659dc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ This package is the official Laravel integration for [Pirsch Analytics](https://
#### Automatically

This package comes with a `TrackPageview` middleware that allows you to track pageviews automatically.
Apply the middleware to your web routes by adding it to the `web` key of the `$middlewareGroups` property in your `app/Http/Kernel.php` class:
Apply the middleware to your web routes by appending it in the `withMiddleware` method in your `bootstrap/app.php` file:

```php
protected $middlewareGroups = [
'web' => [
// ...
->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
\Pirsch\Http\Middleware\TrackPageview::class,
],
// ...
];
]);
})
```

#### Manually
Expand Down

0 comments on commit 74659dc

Please sign in to comment.