PHPackages                             mmoollllee/filament-consent-control - 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. [Admin Panels](/categories/admin)
4. /
5. mmoollllee/filament-consent-control

ActiveLibrary[Admin Panels](/categories/admin)

mmoollllee/filament-consent-control
===================================

Filament admin UI for consent-control: an opt-in settings page/form and a RichEditor plugin for embedding consent-gated iframes.

v0.2.0(2w ago)016MITPHPPHP ^8.2CI passing

Since Jul 9Pushed 5d agoCompare

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

READMEChangelog (1)Dependencies (24)Versions (4)Used By (0)

Filament Consent Control
========================

[](#filament-consent-control)

The **Filament admin layer** for [consent-control](https://github.com/mmoollllee/consent-control): an opt-in settings page/form and a RichEditor plugin for embedding consent-gated iframes.

Part of a three-package stack:

PackageRole[`consent-control`](https://github.com/mmoollllee/consent-control) (npm)Framework-agnostic runtime + CSS.[`laravel-consent-control`](https://github.com/mmoollllee/laravel-consent-control)Blade components, config, drivers, translations, server helpers.**`filament-consent-control`** (this package)Filament settings UI + RichEditor consent-iframe plugin.The frontend banner, blocking and configuration come from `laravel-consent-control`(installed automatically). **A single config file is enough** — this package only adds optional admin convenience on top.

Requirements
------------

[](#requirements)

- PHP 8.2+ · Laravel 11.28+ / 12 / 13 · Filament 5

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

[](#installation)

```
composer require mmoollllee/filament-consent-control
```

This pulls in `laravel-consent-control`. Publish its config and runtime assets, then set up the frontend as described in [its README](https://github.com/mmoollllee/laravel-consent-control):

```
php artisan vendor:publish --tag=consent-control-config
php artisan vendor:publish --tag=consent-control-assets
```

Register the plugin in your panel (does nothing by itself unless you opt in below):

```
use Mmoollllee\FilamentConsentControl\ConsentControlPlugin;

public function panel(Panel $panel): Panel
{
    return $panel->plugins([
        ConsentControlPlugin::make(),
    ]);
}
```

Frontend assets
---------------

[](#frontend-assets)

The banner, content blocking and JS runtime come from `laravel-consent-control` (pulled in automatically) — this package only adds the Filament admin + the RichEditor iframe plugin.

Recommended: **bundle the runtime yourself** so JS/CSS ship with your Vite build instead of extra requests, and render only the boot config on your site layout:

```
// resources/js/app.js
import '../../vendor/mmoollllee/laravel-consent-control/resources/dist/js/consent-control.js';
```

```
/* resources/css/app.css — overlay CSS + let Tailwind style the banner Blade */
@import '../../vendor/mmoollllee/laravel-consent-control/resources/dist/css/consent-message.css';
@source '../../vendor/mmoollllee/laravel-consent-control/resources/views/components/**/*.blade.php';
```

```
{{-- once per page, e.g. before  --}}

```

All options (published assets, no-Tailwind fallback, view publishing) are documented in the [`laravel-consent-control` README](https://github.com/mmoollllee/laravel-consent-control#frontend-assets-choose-one).

To let visitors **reopen the banner** (e.g. from the privacy policy page), place a button with the `consent-control--open` class anywhere — the runtime binds it automatically:

```
Cookie-Einstellungen ändern
```

### Merge tag for editors (filament-cms)

[](#merge-tag-for-editors-filament-cms)

On a site running [`mmoollllee/filament-cms`](https://github.com/mmoollllee/filament-cms) that button is available to editors without typing HTML: the package registers itself with the CMS shortcode registry on boot — nothing to wire up.

- **RichEditor** — pick *"Cookie-Einstellungen (Button)"* from the merge-tag menu.
- **Any rich text** — write the `[consent_settings]` shortcode, optionally with a custom label and extra CSS classes (the trigger class is always kept):

    ```
    [consent_settings]
    [consent_settings label="Cookies verwalten" class="btn btn-primary"]

    ```

The label defaults to `filament-consent-control::consent.reopen_button` — publish the translations to change it globally:

```
php artisan vendor:publish --tag=filament-consent-control-translations
```

Without filament-cms (or on a version older than `Shortcodes::registerMergeTag()`) nothing is registered; `Support\ConsentSettingsButton::html()` renders the same markup for your own views.

Editing settings in Filament (opt-in)
-------------------------------------

[](#editing-settings-in-filament-opt-in)

By default settings are read from `config/consent-control.php`. To edit them at runtime, opt in to the **eloquent driver** and one of the two admin options below.

```
CONSENT_CONTROL_DRIVER=eloquent
```

```
// config/consent-control.php
'eloquent' => [
    'model' => App\Models\Setting::class,   // needs: $casts = ['consent_settings' => 'array']
    'field' => 'consent_settings',
    'record_id' => 1,
],
```

### Option A — ready-made settings page

[](#option-a--ready-made-settings-page)

```
ConsentControlPlugin::make()
    ->settingsPage();
```

Adds a "Consent Settings" page to the panel that reads/writes the configured model.

### Option B — embed the form in your own resource/page

[](#option-b--embed-the-form-in-your-own-resourcepage)

```
use Mmoollllee\FilamentConsentControl\Filament\ConsentSettingsForm;

public function form(Schema $schema): Schema
{
    return $schema->components([
        ConsentSettingsForm::make('consent_settings'),
        // ... your other fields
    ]);
}
```

RichEditor: embed consent-gated iframes
---------------------------------------

[](#richeditor-embed-consent-gated-iframes)

```
use Filament\Forms\Components\RichEditor;
use Mmoollllee\FilamentConsentControl\Filament\ConsentIframePlugin;

RichEditor::make('body')
    ->plugins([
        ConsentIframePlugin::make(),
    ]);
```

The toolbar gets an "Embed iframe" action (URL, consent category, width, height). Pasted YouTube/Vimeo links are auto-converted to privacy-friendly embed URLs (YouTube → nocookie). Stored iframes are rendered on the frontend as blocked `.consent-message--wrapper` markup (`data-src`) and only load once the visitor grants the chosen category — handled by the shared runtime, so make sure `` is on the page.

License
-------

[](#license)

MIT. See [LICENSE.md](LICENSE.md).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance98

Actively maintained with recent releases

Popularity8

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

Every ~15 days

Total

3

Last Release

18d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88283625eedcbfe3f417a3216d2591bb42edb53f361203bb7c46a1d043d70888?d=identicon)[mmoollllee](/maintainers/mmoollllee)

---

Top Contributors

[![mmoollllee](https://avatars.githubusercontent.com/u/26859300?v=4)](https://github.com/mmoollllee "mmoollllee (9 commits)")

---

Tags

laravelcookiefilamentgdprprivacyconsent

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mmoollllee-filament-consent-control/health.svg)

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

###  Alternatives

[filament/filament

A collection of full-stack components for accelerated Laravel app development.

3932.5M4.5k](/packages/filament-filament)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329575.9k35](/packages/codewithdennis-filament-select-tree)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16429.7k](/packages/backstage-mails)[relaticle/flowforge

Flowforge is a lightweight Kanban board package for Filament that works with existing Eloquent models.

415139.6k11](/packages/relaticle-flowforge)[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

248235.8k15](/packages/awcodes-filament-quick-create)

PHPackages © 2026

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