Download the PHP package devrabiul/laravel-cookie-consent without Composer
On this page you can find all versions of the php package devrabiul/laravel-cookie-consent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devrabiul/laravel-cookie-consent
More information about devrabiul/laravel-cookie-consent
Files in devrabiul/laravel-cookie-consent
Package laravel-cookie-consent
Short Description A GDPR-compliant cookie consent solution for Laravel applications with fully customizable cookie banners, granular consent control, and enterprise-grade compliance features.
License MIT
Homepage https://github.com/devrabiul/laravel-cookie-consent
Rated 5.00 based on 1 reviews
Informations about the package laravel-cookie-consent
Laravel Cookie Consent
A GDPR-compliant solution offering enterprise-grade compliance with fully customizable cookie banners for Laravel applications. Simplifies regulatory requirements while maintaining excellent user experience and complete customization capabilities.
Features
- 🔥 One-Click Implementation – Simple installation via Composer with auto-loaded assets
- ⚡ Zero Performance Impact – Lightweight with lazy-loaded components
- 🌍 RTL & i18n Support – Full right-to-left compatibility + multilingual translations
- 🌙 Dark Mode Support – Auto dark/light mode matching system preferences
- 🛡 Granular Consent Control – Category-level cookie management (necessary/analytics/marketing)
- 📦 Complete Customization – Override every color, text, and layout via config
- 📱 Responsive Design – Perfectly adapts to all devices (mobile/tablet/desktop)
- 🧩 No Frontend Dependencies – No jQuery, Bootstrap, or Tailwind required — works everywhere effortlessly
Installation
To get started with Cookie Consent, follow these simple steps:
-
Install the package via Composer:
- Publish the package resources by running: (Normal publish)
Basic Usage
Include these components in your Blade templates:
-
Add styles in the
<head>
section: - Add scripts before closing
</body>
:
Complete Example
Advanced Configuration
🌙 Enable Dark Mode
Add theme="dark"
to your <body>
tag to automatically enable dark mode.
🌐 Enable RTL Mode
Add dir="rtl"
to your <body>
tag to enable right-to-left layout for RTL languages.
Layout Options
Config Status Control
Consent Modal Styles
box
- Compact floating dialogbox-inline
- Inline positioned boxbox-wide
- Expanded floating dialogcloud
- Modern floating designcloud-inline
- Compact cloud variantbar
- Top/bottom bannerbar-inline
- Compact banner
Default: box-wide
Preferences Modal Styles
bar
- Full-width layoutbox
- Centered popup
Default: bar
Configuration
Edit config/cookie-consent.php
to modify:
- Cookie lifetimes
- Visual styles
- Text content
- Category settings
Example service loader (replace with your actual implementation)
Change Cookie Preferences Link
To comply with UK ICO and GDPR regulations, users must be able to revisit and update their cookie preferences at any time. This package now supports that functionality out of the box.
You can add a link anywhere on your site to let users open the cookie preferences modal again and update their choices:
Or use the class-based approach (useful if you want to attach event handlers via JavaScript or multiple links):
How It Works
- Clicking the link will show the cookie preferences modal, allowing the user to change their settings.
- This feature resets the consent banner/modal visibility so users can modify their choices in compliance with the ICO’s requirement.
- The modal respects existing preferences but allows full customization and saving new preferences.
Compliance with UK ICO and GDPR
This package is designed to help your Laravel application meet the requirements of the UK Information Commissioner’s Office (ICO) and the GDPR by:
- Providing explicit, granular cookie consent with customizable categories (e.g., necessary, analytics, marketing, preferences).
- Allowing users to easily revisit and change their cookie preferences at any time using the “Change Cookie Preferences” link.
- Supporting clear cookie banners and modals with translations and accessibility considerations.
- Enabling consent logging and event dispatching for auditing and analytics purposes.
For more details, please review the UK ICO guidance on cookies: ICO Guide to Cookies and Similar Technologies
🎯 Get Started Today!
Experience the magic of CookieConsent and enhance your Laravel applications with Cookie Consent.
🔗 GitHub: Laravel Cookie Consent
🔗 Packagist:
https://packagist.org/packages/devrabiul/laravel-cookie-consent
Contributing
We welcome contributions to CookieConsent! If you would like to contribute, please fork the repository and submit a pull request. For any issues or feature requests, please open an issue on GitHub.
Please:
- Fork the repository
- Create your feature branch
- Submit a pull request
License
This package is open-sourced software licensed under the MIT license.
🌱 Treeware
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Contact
For support or inquiries, please reach out to us at Send Mail.