| Install | |
|---|---|
composer require jeffersongoncalves/filament-cookie-consent |
|
| Latest Version: | v3.2.1 |
| PHP: | ^8.2|^8.3 |

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. It includes a Settings Page to manage all cookie consent options directly from your Filament panel.
| Package Version | Filament Version |
|---|---|
| 1.x | 3.x |
| 2.x | 4.x |
| 3.x | 5.x |
spatie/laravel-settings for persistent, database-backed configurationYou can install the package via composer:
composer require jeffersongoncalves/filament-cookie-consent:^3.2
If you haven't already, publish the Spatie Laravel Settings migration:
php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="migrations"
Then publish and run the cookie consent settings migration:
php artisan vendor:publish --tag=cookie-consent-settings-migrations
php artisan migrate
Register the plugin in your Filament Panel Provider:
use JeffersonGoncalves\Filament\CookieConsent\CookieConsentPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
CookieConsentPlugin::make(),
]);
}
Once registered, the plugin adds a Cookie Consent Settings page to your Filament panel under the "Settings" navigation group. From there you can configure:
If you only want the automatic cookie consent integration without the settings page:
CookieConsentPlugin::make()
->settingsPage(false),
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:
<head> section<body> sectionNo manual template inclusion is required when using this Filament package.
Screenshots using this package in the admin panel provider.
| Top Left | Top Right |
|---|---|
![]() |
![]() |
| Bottom Left | Bottom Right |
![]() |
![]() |
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.