spatie/laravel-cookie-consent
Add a simple, customizable cookie consent banner to Laravel. Shows on first visit, stores consent, then stays hidden. No “decline” option, no tracker blocking, and no consent categories—use other tools if you need advanced compliance features.
This package supports build-vs-buy decisions for basic EU cookie compliance needs, enabling teams to avoid reinventing the wheel for simple consent banners. It’s ideal for MVPs or early-stage products where legal requirements are minimal (e.g., only "accept" functionality needed, no granular categories or decline options). For roadmap planning, it serves as a quick-start solution for GDPR compliance, freeing engineering bandwidth for core features. When legal counsel confirms only a basic banner is required, this package eliminates months of development time and testing for cookie handling logic.
Adopt this package when your project requires a lightweight, out-of-the-box cookie consent banner with no advanced features (e.g., no decline button, no category-based consent, no automatic cookie blocking). Ideal for Laravel projects using TailwindCSS, with simple cookie usage (e.g., only essential cookies), and in regions where only basic EU GDPR compliance is needed. Look elsewhere if you need granular consent controls (e.g., "necessary" vs. "marketing" toggles), a "decline all" option, or automatic cookie blocking before consent—opt for alternatives like whitecube/laravel-cookie-consent or statikbe/laravel-cookie-consent in those cases. Also avoid if your app operates in jurisdictions with stricter regulations (e.g., CCPA) requiring more complex implementations.
Executives: "This package delivers immediate EU cookie compliance with zero engineering overhead. With 1.5k+ GitHub stars and active maintenance, it’s a proven, low-cost solution that mitigates legal risk while letting your team focus on revenue-driving features. We deploy it in minutes—no custom development, no ongoing maintenance burden."
Engineering: "It’s a plug-and-play solution: install via Composer, add one Blade include or middleware, and customize the banner in 10 minutes. Fully tested, supports Laravel 9-13, and uses Tailwind for easy styling. Handles cookie storage and display logic out of the box, eliminating boilerplate code. Perfect for simple compliance needs without bloating our stack."
How can I help you explore Laravel packages today?