PHPackages                             slimani/filament-cookie-consent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. slimani/filament-cookie-consent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

slimani/filament-cookie-consent
===============================

A cookie consent plugin for Filament panels.

v0.1.0(1mo ago)033MITPHPPHP ^8.3CI passing

Since May 1Pushed 1mo agoCompare

[ Source](https://github.com/slimani-dev/filament-cookie-consent)[ Packagist](https://packagist.org/packages/slimani/filament-cookie-consent)[ RSS](/packages/slimani-filament-cookie-consent/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Filament Cookie Consent
=======================

[](#filament-cookie-consent)

[![GitHub Workflow Status](https://camo.githubusercontent.com/7467b000ab6ba21f344fcbde59cd345834556219ee7e8f5cd3abd74707b44a49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736c696d616e692d6465762f66696c616d656e742d636f6f6b69652d636f6e73656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/slimani-dev/filament-cookie-consent/actions/workflows/run-tests.yml)[![GitHub Workflow Status](https://camo.githubusercontent.com/5b83d573956a2f253b874094eb304c7684b4b2b67a65b83a948e85dd5579fc61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736c696d616e692d6465762f66696c616d656e742d636f6f6b69652d636f6e73656e742f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/slimani-dev/filament-cookie-consent/actions/workflows/phpstan.yml)[![GitHub Workflow Status](https://camo.githubusercontent.com/0a9309ee457cd6d7e09b6c90a2d81d00095cefaf7343628347ed2575b2a56c30/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736c696d616e692d6465762f66696c616d656e742d636f6f6b69652d636f6e73656e742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/slimani-dev/filament-cookie-consent/actions/workflows/fix-php-code-style-issues.yml)[![Total Downloads](https://camo.githubusercontent.com/01a1a9670cc2b38082f5017f5f575f62a6e201d41f7ece043aa9be0121e605a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736c696d616e692f66696c616d656e742d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/slimani/filament-cookie-consent)[![License](https://camo.githubusercontent.com/18378ddfb7b231ea317fc0b11906a1ec8f45db0a20362f5de46e4e0ded6aeb18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736c696d616e692f66696c616d656e742d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://github.com/slimani-dev/filament-cookie-consent/blob/main/LICENSE)

A customizable cookie consent plugin for Filament panels. It displays a modal to users to accept or refuse cookies, and provides a middleware to enforce consent if required.

Features
--------

[](#features)

- **Customizable Schema**: Define your own content and fields for the cookie consent modal.
- **Middleware Support**: Automatically redirect users to the dashboard or show the modal if consent is not yet given.
- **Notifications**: Show success notifications upon acceptance or rejection.
- **Easy Integration**: Simple registration via Filament Panel provider.
- **Flexible Configuration**: Control modal heading, description, icon, buttons, and more.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require slimani/filament-cookie-consent
```

Usage
-----

[](#usage)

### Registering the Plugin

[](#registering-the-plugin)

Register the plugin in your Panel Provider:

```
use Slimani\CookieConsent\CookieConsentPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(CookieConsentPlugin::make());
}
```

### Customizing the Plugin

[](#customizing-the-plugin)

You can customize the plugin's behavior using the following methods:

```
CookieConsentPlugin::make()
    ->modalHeading('We value your privacy')
    ->modalDescription('We use cookies to enhance your browsing experience.')
    ->modalSubmitActionLabel('Accept All')
    ->modalCancelActionLabel('Reject All')
    ->modalWidth('4xl')
    ->cookiesRequired() // Enforce consent via middleware
    ->showAcceptedNotification(false)
    ->schema([
        // Your custom Filament schema components here
    ])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Mohamed Slimani](https://github.com/slimani-dev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

40d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/889517e68d00e2c3709f76b1b944493e4303ff205c6a836108fb8dae6eb50cb6?d=identicon)[slimani](/maintainers/slimani)

---

Top Contributors

[![slimani-dev](https://avatars.githubusercontent.com/u/25089144?v=4)](https://github.com/slimani-dev "slimani-dev (3 commits)")

---

Tags

laravelfilamentcookie-consent

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/slimani-filament-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/slimani-filament-cookie-consent/health.svg)](https://phpackages.com/packages/slimani-filament-cookie-consent)
```

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3131.2M25](/packages/ysfkaya-filament-phone-input)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

127173.7k3](/packages/dotswan-filament-map-picker)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122157.7k1](/packages/stephenjude-filament-feature-flags)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

57301.3k3](/packages/creagia-filament-code-field)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12351.0k](/packages/jibaymcs-filament-tour)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
