Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Cookie Consent Bundle

Cookie Consent Bundle Laravel Package

lemric/cookie-consent-bundle

A Symfony bundle for adding a cookie consent banner to your application. It helps you present cookie notices, collect visitor consent, and manage preferences, supporting GDPR-style compliance without hand-rolling a consent flow. Lightweight and quick to configure in any Symfony app.

View on GitHub
Deep Wiki
Context7

Symfony bundle to ask the visitors for their consent to use cookies to comply to AVG/GDPR.

Frequently asked questions about Cookie Consent Bundle
Does lemric/cookie-consent-bundle work in a Laravel application?
No. It is a Symfony bundle whose entry point is a Symfony\Component\HttpKernel\Bundle\Bundle subclass registered in config/bundles.php, with services wired through a DI extension and Twig templates. Laravel has no bundle registry, and Composer auto-discovery only recognizes Illuminate\Support\ServiceProvider, so the package installs but never boots. Only the decoupled Symfony components Laravel shares (HttpFoundation, Console, Process) are relevant here.
How do I install and configure the cookie consent banner in Symfony?
Run composer require lemric/cookie-consent-bundle, then register the bundle in config/bundles.php. Configure your cookie categories (essential, analytics, marketing) through the bundle configuration, override the shipped Twig templates to match your design, and gate each third-party script tag on the visitor's stored consent state. Finish by verifying behaviour with a cookie scanner.
Which Symfony and PHP versions does this bundle support?
The README and overview do not state the declared PHP floor, Symfony constraint range, or Twig dependency, so check composer.json before anything else. The technical review explicitly lists declared version constraints and CI/test coverage as open questions for the maintainer. If the repository pins an old Symfony major, plan for an upgrade or a fork.
Does this bundle actually block cookies and scripts before consent, or only display a banner?
The package ships a banner with accept, reject, and granular category toggles, but the provided material does not confirm that it prevents non-essential scripts or cookies from executing before consent. Banner-only tools are the most common false sense of compliance, so confirm this with the maintainer or spike it yourself. If blocking is missing, you must add the gating logic in your own templates.
How is visitor consent persisted, and is there a server-side audit trail?
The overview describes consent persistence so each visitor's choice is remembered across requests, which is typically a cookie or session payload. It does not state whether a server-side consent record is stored with a timestamp, the privacy policy version or hash, and the categories granted. A DPO will ask for exactly that evidence, so treat it as unverified until you read the code or ask the maintainer.
Can I wrap this bundle in a Laravel ServiceProvider instead of forking it?
A wrapper is a dead end. The bundle's controller and event subscribers depend on Symfony kernel events and container compilation conventions that Laravel does not dispatch or perform. The realistic path is a fork: lift the consent decision logic and cookie payload into a first-party package with a ServiceProvider, a Blade component, middleware, and config/cookie-consent.php, roughly two to four engineer-days of work. The MIT license makes that clean from an IP standpoint.
What are the Laravel alternatives for cookie consent and GDPR banners?
For the banner layer, spatie/laravel-cookie-consent and whitecube/laravel-cookie-consent are framework-native options that install and boot correctly in Laravel. For defensible compliance evidence, a hosted CMP with a contractual DPA such as Cookiebot, Osano, Usercentrics, or OneTrust is often the safer choice. Remember that the banner is the cheap half of the problem; script blocking and consent logging carry the legal weight.
How do I customize the consent dialog templates and styling?
In Symfony you override the bundle's Twig templates inside your application and adjust the CSS to match your design, which the bundle explicitly supports. Services and Twig helpers are exposed through bundle configuration, so you can adjust category labels and dialog behaviour without patching vendor code. In a Laravel fork you would port those templates to a Blade component instead.
Is this package safe to rely on for GDPR compliance?
Treat it as a legal-risk surface rather than a solved problem. The repository shows zero stars, zero dependents, a single maintainer, and no evidence of external review of its consent semantics, so claims of GDPR readiness are unproven. Verify granular categories, withdrawal of consent, and re-prompting when the privacy policy changes before you depend on it.
Is lemric/cookie-consent-bundle actively maintained?
There is no visible community, no dependents, and no stated support commitment, which raises supply-chain risk for a dependency sitting directly on a regulatory obligation. It is MIT licensed, so you can fork or vendor it if needed. Before adopting, check commit history, open issues, and whether CI and tests exist; if not, assume it is effectively abandonware and plan accordingly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections