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

ActiveLibrary

dedecube/laravel-legal-consent
==============================

Laravel Legal Consent

v1.1.1(1y ago)0911MITPHPPHP ^8.1|^8.2

Since Sep 23Pushed 1y agoCompare

[ Source](https://github.com/Dedecube/laravel-legal-consent)[ Packagist](https://packagist.org/packages/dedecube/laravel-legal-consent)[ Docs](https://github.com/dedecube/laravel-legal-consent)[ GitHub Sponsors](https://github.com/dedecube)[ RSS](/packages/dedecube-laravel-legal-consent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (12)Versions (5)Used By (0)

 [![Social Card of Laravel Legal Consent](./art/cover.png)](./art/cover.png)

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

[](#laravel-legal-consent)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0e807cbdb4b0171ff08d092216810f3b607162c053f095725bb545500bfe584d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656465637562652f6c61726176656c2d6c6567616c2d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dedecube/laravel-legal-consent)[![GitHub Tests Action Status](https://camo.githubusercontent.com/13319e865203a082674d11497ba49b76e178330bc543a1f4ad60660bc31fac0a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656465637562652f6c61726176656c2d6c6567616c2d636f6e73656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/dedecube/laravel-legal-consent/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c7fccb017df53f10c1b1e107c1d8de4ffd0aaa7f621ab28d7257115cd8951fae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64656465637562652f6c61726176656c2d6c6567616c2d636f6e73656e742f7068702d63732d66697865722e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/dedecube/laravel-legal-consent/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/4d05b8dfe613d37bd5090e3a9a0d3119b7fb861ced33dca274845390b5e76a11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64656465637562652f6c61726176656c2d6c6567616c2d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dedecube/laravel-legal-consent)

Easily integrate legal documents (like privacy policies, terms of use, etc.) to your application.

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

[](#installation)

You can install the package via composer:

```
composer require dedecube/laravel-legal-consent
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="legal-consent-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="legal-consent-config"
```

[See config file](./config/legal-consent.php)

Usage
-----

[](#usage)

### Basic

[](#basic)

To use the package, add the `Dedecube\LegalConsent\HasLegalConsent` trait to the all Authenticatable models you want to handle.

Here's an example including the `HasLegalConsent` trait to User :

```
