Download the PHP package selli/laravel-gdpr-consent-database without Composer

On this page you can find all versions of the php package selli/laravel-gdpr-consent-database. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-gdpr-consent-database

Laravel GDPR Consent Database

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A comprehensive Laravel package for managing GDPR consent in your applications. This package provides a complete solution for tracking user consents, managing consent types, and ensuring GDPR compliance.

Installation

You can install the package via composer:

Consent Categories

The package supports categorizing consent types to handle different types of consents appropriately:

Cookie Banner Integration

The cookie banner automatically filters and displays only consent types with category 'cookie'. Other consent types should be managed through your application's registration/preference flows.

You can publish and run the migrations with:

You can publish the config file with:

This is the contents of the published config file:

Optionally, you can publish the views using

Usage

Setup

After installing the package and running the migrations, you need to add the HasGdprConsents trait to your User model or any other model that needs to manage GDPR consents:

Creating Consent Types

First, you need to create consent types that users can agree to:

Managing User Consents

Once you have set up consent types, you can manage user consents:

php // Create a consent type with version $consentType = ConsentType::create([ 'name' => 'Privacy Policy', 'slug' => 'privacy-policy', 'description' => 'Privacy Policy consent', 'required' => true, 'active' => true, 'version' => '1.0', ]);

// Create a new version when terms change $newVersion = $consentType->createNewVersion([ 'description' => 'Updated Privacy Policy consent', ]);

// Check if a user's consent is for the current version if ($user->hasConsent('privacy-policy', true)) { // User has consented to the current version } else { // User needs to renew consent for the new version }

// Get all consents that need renewal (expired or outdated version) $consentsNeedingRenewal = $user->consentsNeedingRenewal();

// Renew a consent with the latest version $user->renewConsent('privacy-policy'); bash php artisan db:seed --class="Selli\LaravelGdprConsentDatabase\Database\Seeders\CookieConsentSeeder" blade {{-- Basic usage --}} @gdprCookieBanner

{{-- With custom options --}} @gdprCookieBanner([ 'title' => 'Cookie Preferences', 'message' => 'We use cookies to improve your experience.', 'acceptText' => 'Accept All Cookies', 'rejectText' => 'Reject Optional', 'consentTypes' => $consentTypes ]) bash php artisan vendor:publish --tag="laravel-gdpr-consent-database-views" blade

bash composer test



## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Filippo Calabrese](https://github.com/filippocalabrese)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of laravel-gdpr-consent-database with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package selli/laravel-gdpr-consent-database contains the following files

Loading the files please wait ....