Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Consent For Laravel Laravel Package

jakub-lipinski/consent-for-laravel

Consent for Laravel is a package for managing user consent records in Laravel apps. It helps implement GDPR-style flows where users grant or revoke permissions, then lets your application check and audit those choices throughout models, requests, and views.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for consent management: The package now covers Blade and optional Livewire 3/4 flows, including wire:navigate, redirects, history, and locale changes. This makes it a credible buy/configure option for Laravel teams that would otherwise build consent state, banner UI, audit notices, script gating, preferences, and expiry handling themselves.
  • Roadmap expansion into SPA-like Laravel experiences: Livewire support expands the addressable use cases from traditional full-page Blade apps to apps using Livewire navigation and components, without forcing Livewire as a dependency. This can unblock roadmap work on more interactive Laravel UIs while retaining the same consent model.
  • Localization and market expansion: Czech and Dutch bring the bundled interface to nine languages. This supports launch decisions for CZ/NL/BE-facing products, regional fallback behavior, and localized audit notices without custom translation work for common cases.
  • Compliance and trust surface: Signed audit notices, consent refusal handling, withdrawal signals, declared-cookie cleanup, and stable expiry behavior support decisions around consent records, auditability, and regulatory readiness. The release explicitly preserves saved preferences and expiry when policy/services/consent settings are unchanged.
  • Analytics and measurement design: The consent:navigated event and guarded helpers support SPA/Livewire measurement planning, but the adapter sends no automatic SPA measurements. Product and analytics teams must decide whether and how to register listeners and avoid duplicate GA4/history measurement.
  • Upgrade and maintenance planning: No new database migration, cookie migration, or automatic consent reset is required. This lowers rollout risk, but product owners should still plan for asset refreshes, cache clears, CSP validation, and Livewire-specific testing where applicable.
  • Documentation and internal enablement: The dedicated Livewire reference and expanded Boost skill guidance support engineering onboarding and reduce dependence on package maintainers for common integration patterns.

When to Consider This Package

Consider adoption when:

  • The product is a Laravel 12–13 / PHP 8.3+ application using Blade, and optionally Livewire 3.8.10+ or 4.4.7+.
  • You need a configurable consent banner/dialog with preferences, script gating, audit notices, expiry, and refusal/withdrawal behavior.
  • You are expanding into Livewire navigation or SPA-like flows and need consent UI, language updates, and script activation to survive page swaps.
  • You need bundled translations for common European markets, including Czech and Dutch, with regional fallback such as cs-CZ, nl-NL, nl-BE.
  • You want to avoid a database or cookie migration during this upgrade and can preserve existing services, presets, IDs, policy version, cookie scopes, audit settings, colors, and custom wording.
  • You can validate the application’s actual CSP, including nonces for consent components and Livewire where relevant.
  • You can refresh customized head/banner views and all three published assets together: consent.js, banner.js, and consent.css.

Look elsewhere or defer when:

  • The application is not Laravel/PHP or cannot meet the PHP 8.3+ / Laravel 12–13 baseline.
  • You need a consent platform with automatic SPA analytics measurement built in. This package emits consent:navigated, but explicitly does not send automatic SPA measurements.
  • You require active withdrawal to stop already-running tracker code without a full reload. The release notes state SPA visits cannot stop running tracker code, so active withdrawal retains its required full reload.
  • You cannot accommodate Livewire integration constraints, CSP requirements, asset refreshes, cache invalidation, or the documented layout rules around one head and one banner per shared layout.
  • You have heavily customized views/assets and cannot safely refresh the head, banner, and published assets together while preserving runtime-context markers, navigation attributes, data-consent-container, audit notice, wire:ignore, presentation key, and locale/context attributes.
  • You need the package to loosen CSP or repair invalid script nonces. It does not do so.

How to Pitch It (Stakeholders)

Executive summary: This release makes the consent package materially more suitable for modern Laravel products. Optional Livewire 3/4 support means teams can add consent-aware navigation and component updates without making Livewire mandatory. Czech and Dutch translations expand market readiness to nine bundled languages, including regional fallbacks. Existing saved preferences and expiry remain compatible when policy, services, and consent settings are unchanged, and there is no new database migration, cookie migration, or automatic consent reset.

For engineering: The upgrade is backward-compatible by default, with optional livewire.enabled and livewire.navigation settings defaulting to true and auto. Teams should refresh customized head/banner views and all three published assets together, clear compiled Blade/Livewire caches, cache-bust external assets, and test real CSP behavior. Livewire integration includes script activation pausing/resuming, stable keys, locale updates, and a consent:navigated event, but no automatic SPA measurements. Applications without Livewire need no new frontend dependency or build.

For product/compliance: The package continues to support consent refusal, audit recovery, withdrawal signals, signed audit notices, saved-choice fingerprints, and expiry rules. Localization now covers complete banner/dialog and signed audit notice content in Czech and Dutch, with fallback behavior for regional locales. Product teams should still validate market-specific legal copy, analytics measurement choices, and withdrawal flows, especially where SPA navigation or running trackers are involved.

Rollout recommendation: Treat v1.5.0 as a low-migration-risk feature upgrade for existing adopters, but a moderate integration-risk upgrade for Livewire-heavy or heavily customized deployments. Pilot on a representative Livewire navigation flow, verify CSP and asset refresh, confirm translation fallback behavior, and validate that measurement listeners for consent:navigated are registered once and do not duplicate existing analytics views.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc