From 4b5122129dfeade60fcc217cc06f8c9f43055397 Mon Sep 17 00:00:00 2001 From: Alexis Saettler Date: Tue, 26 Mar 2024 14:00:50 +0100 Subject: [PATCH] Update README.md --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ac20409..fa62936 100644 --- a/README.md +++ b/README.md @@ -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, ]); }) ``` @@ -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, + ]); + }) ```