Skip to content

Commit

Permalink
Add L11 global middleware syntax. (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzahMadni authored Dec 24, 2024
1 parent fbf272d commit 3f2fe85
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ This will copy the `index` and `dialogContents` view files over to `resources/vi

Instead of including `cookie-consent::index` in your view you could opt to add the `Spatie\CookieConsent\CookieConsentMiddleware` to your kernel:

In Laravel 11 open /bootstrap/app.php and register them there:

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

In Laravel 9 and 10 you can add them in app/Http/Kernel.php:

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

Expand Down

0 comments on commit 3f2fe85

Please sign in to comment.