PHPackages                             pushery/legal-consent-for-laravel - 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. pushery/legal-consent-for-laravel

ActiveLibrary

pushery/legal-consent-for-laravel
=================================

Court-proof, versioned legal consent for Laravel — GDPR-correct separation of contract acceptance, notice acknowledgement, and consent, with an append-only audit trail.

v0.12.0(3w ago)32.7k↑5800%MITPHPPHP ^8.4

Since Jul 11Pushed 1w agoCompare

[ Source](https://github.com/pushery/legal-consent-for-laravel)[ Packagist](https://packagist.org/packages/pushery/legal-consent-for-laravel)[ Docs](https://github.com/pushery/legal-consent-for-laravel)[ RSS](/packages/pushery-legal-consent-for-laravel/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (45)Versions (14)Used By (0)

 [ ![Legal Consent for Laravel](https://raw.githubusercontent.com/pushery/legal-consent-for-laravel/main/art/header.png) ](https://github.com/pushery/legal-consent-for-laravel)

Legal Consent for Laravel
=========================

[](#legal-consent-for-laravel)

[![Latest Version](https://camo.githubusercontent.com/3c964c180f500c11252e2e2973ac46d30677bf1859aa0be7fd973ba77f57c176/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707573686572792f6c6567616c2d636f6e73656e742d666f722d6c61726176656c2e737667)](https://packagist.org/packages/pushery/legal-consent-for-laravel)[![PHP Version](https://camo.githubusercontent.com/37b678f3bfbdd8b9508ba7a0283b4e8b69c36065fb638dec89a925bcaa564eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f707573686572792f6c6567616c2d636f6e73656e742d666f722d6c61726176656c2f7068702e737667)](https://packagist.org/packages/pushery/legal-consent-for-laravel)[![Laravel Versions](https://camo.githubusercontent.com/0ecb5630f15968ee20b4d68e1990f695f2a53cc4728e4011282f6dae2c5847fb/68747470733a2f2f62616467652e6c61726176656c2e636c6f75642f62616467652f707573686572792f6c6567616c2d636f6e73656e742d666f722d6c61726176656c3f7374796c653d666c6174)](https://packagist.org/packages/pushery/legal-consent-for-laravel)[![PHPStan](https://camo.githubusercontent.com/c47b2ba3238269b2d6f0e8c346934f4e94ee7ff7345c2738e62830182711717f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6d61782d626c75652e737667)](https://phpstan.org)[![Code Style](https://camo.githubusercontent.com/d1e49fbc2c712416be5a417fd3a8d339062c657ecbe46e4ada4dd0156dfd325f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d70696e742d6f72616e67652e737667)](https://laravel.com/docs/pint)[![License](https://camo.githubusercontent.com/f4d4e60290e902613eaec51a50768a01894afbc4ef63f4d95b4d2176d169c617/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f707573686572792f6c6567616c2d636f6e73656e742d666f722d6c61726176656c2e737667)](LICENSE)

Court-proof, versioned legal consent for Laravel. It is a **document-acceptance ledger**: the package **renders and proves** your legal texts — it does not own them.

A registration does three legally distinct things — accepting a contract, taking notice of a privacy notice, and giving a real consent — and treating them as one "I accept everything" checkbox is a common, and real, GDPR violation. This package keeps them apart, and proves acceptance the way the law requires (Art. 7(1); EDPB 05/2020 §108): it stores the **exact text a user was shown**, its version and hash, and the server-side context — not just a timestamp.

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

[](#installation)

```
composer require pushery/legal-consent-for-laravel
```

PHP 8.4+ · Laravel 13 · SQLite, PostgreSQL, and MySQL 8.4 LTS — every database-touching path is tested against a real PostgreSQL and a real MySQL, not just SQLite.

What it does
------------

[](#what-it-does)

- **Append-only audit ledger** — every acceptance, acknowledgement, and withdrawal is one immutable row with denormalized proof, hardened by a database trigger and an app-layer guard.
- **Versioned documents** — a SHA-256 hash detects a change; you classify how it must be communicated; only a core contract change forces active re-consent.
- **Four notice modes** — silent editorial, announced-but-never-blocking, deemed consent with an objection window (§ 308 Nr. 5 BGB), and a hard re-consent gate — each with delivery proof.
- **Interchangeable content sources** — Markdown files, or an admin-maintained draft store reviewed per locale before a publish freezes it.
- **Fortify-optional** — record consent three ways: a trait, an event listener, or a headless JSON API. `laravel/fortify` is never required.
- **Optional, off by default** — a tamper-evidence hash chain, an Art. 8 age gate, and multi-tenancy scoping, each a single config switch.
- **Optional reactive UI** — plain Blade stubs by default; opt-in Livewire components and a WireKit-flavored variant, with no hard Livewire or Flux dependency.

Documentation
-------------

[](#documentation)

**Full docs at [docs.pushery.com/legal-consent-for-laravel](https://docs.pushery.com/legal-consent-for-laravel/).**

- [Installation](https://docs.pushery.com/legal-consent-for-laravel/installation) — requirements, the publish tags, and the two groups that stay separate because publishing them unasked would destroy data.
- [Quick start](https://docs.pushery.com/legal-consent-for-laravel/quick-start) — write a text, publish a version, give a model a ledger, switch the gate on.
- [Recording consent](https://docs.pushery.com/legal-consent-for-laravel/recording-consent) — the three ways to write the ledger, the registration checklist, and the accept-time hash guard.
- [The four notice modes](https://docs.pushery.com/legal-consent-for-laravel/notice-modes/overview)— how a change is classified, announced, and only sometimes enforced, with a worked example each.
- [Configuration reference](https://docs.pushery.com/legal-consent-for-laravel/reference/configuration)— every key, its default, and what it decides.

Quality bar
-----------

[](#quality-bar)

Every change is held to Laravel Pint, Larastan at `max`, Rector, and a test suite at 100% line and type coverage, plus mutation testing, a real-browser end-to-end suite, and cross-engine tests against a real PostgreSQL and MySQL 8.4 — the engines it runs on in production. The full gate runs before every release.

The suite is not part of the published package: the tests and their PHPUnit configuration stay in the development repository, so `composer test` has nothing to run from an installed copy. See [CONTRIBUTING.md](https://github.com/pushery/legal-consent-for-laravel/blob/main/CONTRIBUTING.md).

Security
--------

[](#security)

Please review the [security policy](SECURITY.md) and report vulnerabilities privately rather than opening a public issue.

Built by Pushery
----------------

[](#built-by-pushery)

This package is built and maintained by [Pushery](https://www.pushery.com) — a Berlin-based studio building Laravel applications, SaaS products, and open-source tools.

Building a Laravel UI? [WireKit](https://wirekit.app), Pushery's open-source Livewire component kit, gives you a polished component library out of the box. Browse the rest of our work at [pushery.com](https://www.pushery.com).

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for details.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance96

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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 ~2 days

Total

13

Last Release

25d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b684549435f88b531446bf3d993ab1ec3c5a4f3a8b6409a6f60f9836a964fc0f?d=identicon)[pushery](/maintainers/pushery)

---

Top Contributors

[![pushery](https://avatars.githubusercontent.com/u/272318911?v=4)](https://github.com/pushery "pushery (16 commits)")

---

Tags

auditaudit-logaudit-techcomlianceconsentdatenschutzdocument-versioningdsgvogdprlaravellaravel-fortifylaravel-frameworklaravel-packagelegalphpphp8privacyregulatory-complianceuser-consentlaravel

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/pushery-legal-consent-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/pushery-legal-consent-for-laravel/health.svg)](https://phpackages.com/packages/pushery-legal-consent-for-laravel)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M166](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k17.6M165](/packages/laravel-pulse)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M271](/packages/laravel-mcp)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

1.0k2.5M152](/packages/roots-acorn)

PHPackages © 2026

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