jeffersongoncalves/filament-cookie-consent
Add GDPR and CCPA-compliant cookie consent to your Filament panel via an admin Settings page. Customize colors, position, theme, and content from the dashboard, with database-driven settings powered by spatie/laravel-settings. Works automatically, no Blade edits needed.
Architecture fit. The package is a thin Filament panel plugin, not a general-purpose consent platform. Its entire value is a render-hook integration: CookieConsentPlugin::make() registered in a PanelProvider injects a head script and a body banner automatically, and optionally registers a Settings page under the "Settings" nav group. It delegates the actual consent logic to jeffersongoncalves/laravel-cookie-consent (now ≥4.2) and persists configuration through spatie/laravel-settings.
Critical scoping finding: the README is explicit that render hooks target Filament panel pages. That means this package delivers consent UI over your admin/back-office surface, not your customer-facing application. If the compliance driver is marketing cookies, analytics tags, or ad pixels on the public site, this package does not solve that problem — you would need the underlying laravel-cookie-consent package wired into the app's own layout, or a different vendor. Confirming which surface is in scope is the single highest-value question before any engineering time is spent.
Integration feasibility. Mechanically low effort: composer require, publish two migration sets (Spatie settings plus the package's own), php artisan migrate, register the plugin, done. No Blade edits, no asset publishing required. The ->settingsPage(false) escape hatch supports a config-only deployment if you don't want editors touching consent copy.
Technical risk.
^5.3. Filament 5.x is a narrow adoption window; teams on Filament 3 or 4 must use the 1.x or 2.x branches, which have diverged feature sets (the Compliance section and Google Consent Mode v2 land only on the current line).^5.3 inside a patch release, driven by an upstream Filament signature change. Expect forced upgrades timed to Filament's schedule, not yours.filament/spatie-laravel-settings-plugin → spatie/laravel-settings → laravel-cookie-consent → filament-plugin-core (introduced at v3.3.0). Five transitive surfaces, all single-maintainer-adjacent, all of which can break the banner.Key questions.
dataLayer/Consent Mode v2?Stack fit. Clean fit only if you are already on Laravel 11+/PHP 8.2+ and Filament 5.3+. If the panel is on Filament 3.x or 4.x, you inherit an older branch with a different feature set; if you're mid-migration to Filament 5, this becomes a passenger on that migration rather than an independent workstream.
Migration path.
cookie-consent-settings-migrations. Confirm table names don't collide with existing settings tables in a multi-panel install.settingsPage() enabled so you can inspect the default configuration surface.settingsPage(false) variant to a staging panel to confirm the config-only path works for environments where editorial access isn't wanted.Compatibility. Pin an exact version in composer.json (e.g. 3.7.*, not ^3.0) — patch releases have carried breaking minimum-version bumps. Lock the Filament minor version alongside it. Budget a recurring review cadence for Filament upgrades, since this package tracks Filament's Page::routes() signature.
Sequencing.
filament-gtm/filament-gtag — the release notes assert this ordering, but validate it in the rendered HTML.Maintenance burden. Low code surface, moderate version-churn surface. The package itself rarely needs patching, but it is pinned to Filament's bleeding edge, so your Filament upgrade cadence becomes its maintenance cadence. Assign explicit ownership: one engineer accountable for the Filament version contract and one for the consent copy/legal review.
Support. Documentation is a solid README plus a per-release changelog and an agent-skill file. That is above average for a nine-star package. There is no support contract, no issue-triage SLA, and a single maintainer — treat upstream support as best-effort and keep a fork-ready posture. The MIT license and small code footprint make an emergency fork genuinely viable, which materially de-risks the bus-factor problem.
Scaling. The runtime cost is negligible: two render hooks and a settings read per panel page load. The scaling concern is operational, not computational — with spatie/laravel-settings, configuration is cached, so edits made through the Settings page may require a cache flush to take effect. In a multi-panel or multi-tenant deployment, confirm whether settings are global or panel-scoped; a global consent banner shared across panels with different cookie profiles would be a correctness bug.
Failure modes.
Page::routes() signature and the plugin stops resolving routes — historically this has already happened once.Ramp-up. Genuinely fast — an engineer unfamiliar with the package can install and see a banner in under an hour. The expensive learning is not the package: it's the cookie inventory, the legal interpretation of "compliant," and the script-gating work. Budget roughly 80% of effort on compliance substance and 20% on the plugin, and set expectations accordingly with stakeholders who may read the README's compliance claim as a turnkey solution.
How can I help you explore Laravel packages today?