christopheraseidl/laravel-cookie-consent
A Laravel package for adding cookie consent to your application. It provides a simple way to display a consent banner, record user choices, and conditionally load cookies or scripts until permission is granted, with configurable settings, views, and easy integration for common consent workflows.
Start with the package README and the v1.1.0 changelog, then inspect the published config file and the Livewire component registration in the service provider. The release refactored installation/uninstallation commands and added a new config file, so use the current install flow rather than older examples.
Minimal path:
</body>.First practical use case: add the consent banner to a Laravel app layout, publish the config, customize the copy and categories, then verify the banner renders and consent choices persist across requests. If you are upgrading from v1.0.0, begin by diffing your published views/config against v1.1.0 before changing application code.
Use the package as a layout-level Livewire component. Keep it in the shared app layout so every page can display the banner and persist consent consistently.
Common patterns:
For deployment, include config/asset publishing and cache clearing in your release process if the package’s install command does not already handle it. For multi-environment apps, confirm that published assets are available in production and that config caching does not hide stale package settings.
php artisan config:clear, php artisan view:clear, and php artisan optimize:clear as appropriate. Stale compiled views or cached config are common causes of “the banner still looks old” after an upgrade.How can I help you explore Laravel packages today?