Are you struggling to make your Laravel app GDPR-compliant without compromising user experience? Say hello to Laravel Cookie Consent – a powerful, fully customizable cookie consent solution designed specifically for Laravel applications.

🔗 GitHub Repository

🔗 Documentation


✅ Why Use Laravel Cookie Consent?

Managing cookie consent can be tedious, but Laravel Cookie Consent makes it effortless with:

🔥 One-Click Implementation – Just install via Composer and you're ready to go!

Zero Performance Impact – Optimized for speed, with lazy-loaded assets.

🌍 RTL & i18n Support – Supports multilingual sites and RTL layouts.

🌙 Dark Mode Support – Adapts automatically to system preferences.

🛡 Granular Consent Control – Users can accept/reject cookies by category.

📦 Complete Customization – Customize UI, text, and styles to match your brand.

📱 Fully Responsive – Works flawlessly on desktop, tablet, and mobile.


🚀 Installation in Seconds

Get started in 3 simple steps:

1️⃣ Install via Composer

composer require devrabiul/laravel-cookie-consent

2️⃣ Add the styles to your

{!! CookieConsent::styles() !!}

3️⃣ Add the scripts before

{!! CookieConsent::scripts() !!}

💡 That’s it! Laravel Cookie Consent will now handle cookie management in your app!


🎨 Customize Everything

Out of the box, Laravel Cookie Consent provides multiple layout options, including:

Modal Styles: box, box-inline, cloud, bar, bar-inline

Preferences Modal: bar, box

💡 Need more control? Edit config/cookie-consent.php to modify:

  • Cookie lifetimes
  • Text and button labels
  • Consent categories (analytics, marketing, preferences, etc.)
  • UI styles and theme settings

🛠 Advanced Features

For developers who need enterprise-grade compliance, Laravel Cookie Consent includes:

Cookie Expiry Configuration – Customize lifetime for accepted/rejected cookies.

Disable Page Interaction – Block access until consent is given.

Policy Links – Easily add links to your Privacy Policy and Terms & Conditions.

Example configuration:

{!! CookieConsent::scripts(options: [
   'cookie_lifetime' => 7, 
   'reject_lifetime' => 1, 
   'disable_page_interaction' => true, 
   'preferences_modal_enabled' => true
]) !!}

💡 Join the Community

Laravel Cookie Consent is open-source and constantly improving. Developers are welcome to contribute, suggest features, and help build a better Laravel ecosystem.

🔗 GitHub Repository – Star it if you like it! ⭐

🔗 Packagist Page


📢 Final Thoughts

Whether you're building a startup or maintaining a large-scale Laravel project, cookie compliance shouldn't be a hassle. Laravel Cookie Consent ensures GDPR compliance while keeping UX intact.

💻 Try it now and make your Laravel site privacy-friendly in minutes!

Got questions or feedback? Drop a comment below or reach out at Send Mail. 🚀