Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Mar 26, 2024
1 parent 356b0fc commit 4b51221
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ This package comes with a `TrackPageview` middleware that allows you to track pa
Apply the middleware to your web routes by appending it in the `withMiddleware` method in your `bootstrap/app.php` file:

```php
use Pirsch\Http\Middleware\TrackPageview;
->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
TrackPageview::class,
\Pirsch\Http\Middleware\TrackPageview::class,
]);
})
```
Expand Down Expand Up @@ -110,12 +108,11 @@ class TrackPageview extends Middleware

Then replace the `TrackPageview` middleware with this one on your `bootstrap/app.php` middleware configuration:

```php
use App\Http\Middleware\TrackPageview;

->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
TrackPageview::class,
]);
})
```diff
->withMiddleware(function (Middleware $middleware) {
$middleware->web(append: [
- \Pirsch\Http\Middleware\TrackPageview::class,
+ \App\Http\Middleware\TrackPageview::class,
]);
})
```

0 comments on commit 4b51221

Please sign in to comment.