Download the PHP package origami/consent without Composer
On this page you can find all versions of the php package origami/consent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download origami/consent
More information about origami/consent
Files in origami/consent
Package consent
Short Description Helper interface for user consent in laravel projects
License MIT
Informations about the package consent
Laravel Consent 
About
The origami/consent
helper package contains a Laravel model trait to make saving, comparing and revoking consent easier. The package saves all updates to consent to the consent
table and provides a GivesConsent
trait for models like the User model.
The necessity for the package came about through GDPR and the UK Information Commissioner's Office guidance on "Consent".
Installation
This package is designed for Laravel >= 6.0. You can pull in this package through composer.
You should publish the consent table migration with:
The migrate the database:
Usage
To use the package, add the GivesConsent
trait to a model you'd like to track consent for.
Give consent
You can mark explicit consent given like this:
GDPR requires you to keep a record of exactly what was shown at the time. You can do this in the text
attribute, and pass anything extra in meta
Give consent
You can revoke a user's consent like so:
Checking consent
You can check if consent is given like so:
If consent has not been set, the default is false
. You can change that in the 2nd paramter.
Current consent
You can get the user's current consent status like so. This will be an instance of Origami\Consent\Consent
Contributing
Please submit improvements and fixes :)
Author
License
All versions of consent with dependencies
illuminate/contracts Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/database Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/events Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0