A GDPR-compliant solution offering enterprise-grade compliance with fully customizable cookie banners for Laravel applications.
A GDPR-compliant solution offering enterprise-grade compliance with fully customizable cookie banners for Laravel applications.
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.
To get started with Cookie Consent, follow these simple steps:
composer require devrabiul/laravel-cookie-consentphp artisan vendor:publish --provider="Devrabiul\CookieConsent\CookieConsentServiceProvider"Include these components in your Blade templates:
{!! CookieConsent::styles() !!}{!! CookieConsent::scripts() !!}
Your Page
{!! CookieConsent::styles() !!}
{!! CookieConsent::scripts() !!}
…Add theme="dark" to your `` tag to automatically enable dark mode.
This package now supports preset color themes for cookie banners. You can choose from:
| Preset | Description |
|---|---|
basic |
Default neutral theme, clean and simple. |
modern-blue |
Professional blue style, ideal for SaaS/web apps. |
trust-green |
Privacy-friendly green, promotes trust and eco-friendly vibes. |
soft-neutral |
Minimal soft gray, subtle and non-intrusive. |
dark |
Dark mode theme, low-light friendly. |
In config/cookie-consent.php:
/*
|--------------------------------------------------------------------------
| Theme Preset
|--------------------------------------------------------------------------
| basic - Default neutral theme
| modern-blue - Professional blue style
| trust-green - Privacy-friendly green style
| soft-neutral - Minimal soft gray theme
| dark - Dark theme
*/
'theme_preset' => env('COOKIE_CONSENT_THEME_PRESET', 'basic'),Add dir="rtl" to your `` tag to enable right-to-left layout for RTL languages.
COOKIE_CONSENT_ENABLED=true
COOKIE_CONSENT_PREFERENCES_ENABLED=true
COOKIE_CONSENT_ASSET_URL=https://your-domain.com // if you are in localhost, avoid this or put null
COOKIE_CONSENT_ANALYTICS=true
COOKIE_CONSENT_MARKETING=true
COOKIE_CONSENT_PREFERENCES=truebox - Compact floating dialogbox-inline - Inline positioned boxbox-wide - Expanded floating dialogcloud - Modern floating designcloud-inline - Compact cloud variantbar - Top/bottom bannerbar-inline - Compact bannerDefault: box-wide
bar - Full-width layoutbox - Centered popupDefault: bar
Edit config/cookie-consent.php to modify:
…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:
Change Cookie PreferencesOr use the class-based approach (useful if you want to attach event handlers via JavaScript or multiple links):
Change Cookie PreferencesThis package is designed to help your Laravel application meet the requirements of the UK Information Commissioner’s Office (ICO) and the GDPR by:
For more details, please review the UK ICO guidance on cookies: ICO Guide to Cookies and Similar Technologies
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
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:
This package is open-sourced software licensed under the MIT license.
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.
For support or inquiries, please reach out to us at Send Mail.
No open issues yet, or sync has not completed.