定制 jeffersongoncalves/filament-cookie-consent 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jeffersongoncalves/filament-cookie-consent

最新稳定版本:v3.0.0

Composer 安装命令:

composer require jeffersongoncalves/filament-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. It offers a clean and customizable interface, allowing you to easily manage and display cookie consent banners and preferences.

README 文档

README

Filament Cookie Consent

Filament Cookie Consent

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

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.

Compatibility

Package Version Filament Version
1.x 3.x
2.x 4.x
3.x 5.x

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 higher
  • Filament 4.0

Installation

You can install the package via composer:

composer require jeffersongoncalves/filament-cookie-consent:^2.0

Usage

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.

Configuration

To customize the appearance and behavior of the cookie consent banner, you should first publish the configuration file:

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

Then, you can customize the configuration in the config/cookie-consent.php file.

return [ 'css' => 'https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css', 'js' => 'https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js', 'content' => [ 'href' => null, 'close' => '❌', ], 'palette' => [ 'popup' => [ 'background' => '#696969', 'text' => '#FFFFFF', 'link' => '#FFFFFF', ], 'button' => [ 'background' => 'transparent', 'border' => '#f8e71c', 'text' => '#f8e71c', ], 'highlight' => [ 'background' => '#f8e71c', 'border' => '#f8e71c', 'text' => '#000000', ], ], 'position' => 'bottom-left', // top-left, top-right, bottom-left, bottom-right 'theme' => 'block', // block, edgeless, classic ];

Screenshots

Screenshots using this package in the admin panel provider.

Top Left Top Right
Top Left Top Right
Bottom Left Bottom Right
Bottom Left Bottom Right

Admin Panel Provider

To use this package, you need to register the CookieConsentServiceProvider in your composer.json (automatically done via Laravel package discovery) and ensure it's available for your Filament panels.

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.

The integration is automatically handled by the CookieConsentServiceProvider, which registers the necessary assets for all Filament panels.

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.

统计信息

  • 总下载量: 775
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固