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 offers a clean and customizable interface, allowing you to easily manage and display cookie consent banners and preferences.
You can install the package via composer:
composer require jeffersongoncalves/filament-cookie-consent
This package automatically integrates cookie consent functionality into your Filament panels. Once installed, the cookie consent banner will be automatically displayed on all Filament panel pages without any additional configuration.
You can customize the cookie consent appearance and behavior by publishing 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',
];
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.
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.