Plugins
Cookie Consent
This Filament package provides a simple and elegant way to implement cookie consent on your website, ensuring compliance with privacy regulations like GDPR and CCPA.
Widget
Dark theme support
Yes
Multi language support
Yes
Compatible with the latest version
Supported versions: 3.x - 4.x
Documentation

Laravel Created By

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

This Filament package provides seamless integration of cookie consent functionality into your Filament admin panels, ensuring compliance with privacy regulations like GDPR and CCPA. It automatically injects cookie consent banners and preferences into all Filament panels without requiring manual template modifications.

#Features

  • 🚀 Automatic Integration: No need to manually add blade templates - works out of the box with Filament
  • 🎨 Clean & Customizable: Elegant interface that matches your Filament theme
  • ⚖️ GDPR & CCPA Compliant: Ensures your application meets privacy regulation requirements
  • 🔧 Highly Configurable: Extensive configuration options for customization
  • 📱 Responsive Design: Works perfectly on desktop and mobile devices
  • 🌐 Multi-language Support: Easily translatable for international applications

#Requirements

  • PHP 8.2 or higher
  • Laravel 11.0 or 12.0
  • Filament 3.0 or higher

#Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-cookie-consent

#Usage

#Automatic Integration (Recommended)

This package automatically integrates with all your Filament panels. Once installed, cookie consent functionality will be automatically injected into your Filament admin interface without any additional configuration.

The package uses Filament's render hooks to automatically add:

  • Cookie consent scripts to the <head> section
  • Cookie consent banner to the end of the <body> section

#Configuration

You can publish and customize the configuration file:

php artisan vendor:publish --tag=cookie-consent-config

This will publish the configuration file to config/cookie-consent.php where you can customize:

  • Message content: Customize the cookie consent message, button text, and privacy policy link
  • Styling: Configure colors for the popup background, text, and button
  • Position: Set the position of the cookie consent banner (bottom-left, bottom-right, top-left, top-right, etc.)

Example configuration:

return [
'content' => [
'message' => 'This website uses cookies and other tracking technologies...',
'dismiss' => 'Accept',
'link' => 'Privacy Policy',
'href' => '/privacy-policy',
],
'palette' => [
'popup' => [
'background' => '#696969',
'text' => '#FFFFFF',
],
'button' => [
'background' => '#FFAB00',
'text' => '#FFFFFF',
],
],
'position' => 'bottom-left',
];

#How it works

This package extends the jeffersongoncalves/laravel-cookie-consent package specifically for Filament panels. It automatically registers render hooks that inject the cookie consent templates into your Filament panel pages:

  • Cookie consent scripts are automatically added to the <head> section
  • Cookie consent banner is automatically added to the end of the <body> section

No manual template inclusion is required when using this Filament package.

#Testing

composer test

#Changelog

Please see CHANGELOG for more information on what has changed recently.

#Contributing

Please see CONTRIBUTING for details.

#Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

#Credits

#License

The MIT License (MIT). Please see License File for more information.

Featured Plugins