From 2d78c42414c522f3056d26120a08cddabd5c5b9a Mon Sep 17 00:00:00 2001 From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:14:45 +0200 Subject: [PATCH 1/3] Added FAQ section with the first advice --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 4dc2730..cfcd8c0 100644 --- a/README.md +++ b/README.md @@ -508,6 +508,21 @@ When defining your own views & styles, keep in mind that cookie notices are obst --- +## FAQ + +
+ If you use Laravel Octane + + It optimizes your application by storing requests in RAM. Some reports mention that you need to flush the cookieConsent class to ensure it correctly saves the consent value, like so in your config/octane.php: + +```php +'flush' => [ + 'cookie.consent', + \WhiteCube\LaravelCookieConsent\CookieConsent::class, + ], +``` +
+ ## Development roadmap We have a few ideas to further improve this package in the future. If you wish to add useful features, feel free to open a PR or an issue on this repository. From c47eb654a685c9a89691b7c092b56a64ab77ee26 Mon Sep 17 00:00:00 2001 From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com> Date: Fri, 10 Oct 2025 09:18:06 +0200 Subject: [PATCH 2/3] Added laravel version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cfcd8c0..dfca452 100644 --- a/README.md +++ b/README.md @@ -511,7 +511,7 @@ When defining your own views & styles, keep in mind that cookie notices are obst ## FAQ
- If you use Laravel Octane + If you use Laravel Octane with Laravel 11 It optimizes your application by storing requests in RAM. Some reports mention that you need to flush the cookieConsent class to ensure it correctly saves the consent value, like so in your config/octane.php: From 5a9692eac70520aa6bb9e13570970b2f86c0d22e Mon Sep 17 00:00:00 2001 From: Debatty-Tom <145542891+Debatty-Tom@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:48:08 +0200 Subject: [PATCH 3/3] Update "Using Laravel Octane with Laravel 11?" question in FAQ --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfca452..83fa623 100644 --- a/README.md +++ b/README.md @@ -511,9 +511,13 @@ When defining your own views & styles, keep in mind that cookie notices are obst ## FAQ
- If you use Laravel Octane with Laravel 11 + Using Laravel Octane with Laravel 11? - It optimizes your application by storing requests in RAM. Some reports mention that you need to flush the cookieConsent class to ensure it correctly saves the consent value, like so in your config/octane.php: + Laravel Octane optimizes your application by keeping parts of it in memory between requests. + To ensure the cookie consent setup is correctly reset for each incoming Octane request: + +1. Make sure the LaravelCookieConsent cookies are not encrypted +2. Add the following items to the flushed dependencies in `config/octane.php`: ```php 'flush' => [