Download the PHP package senses/laravel-gdpr without Composer

On this page you can find all versions of the php package senses/laravel-gdpr. 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

Senses Laravel GDPR

Laravel package to handle management of cookies via type. Heavily inspired by Spatie's laravel-cookie-consent package

Installation

In config/app.php

Usage

Backend

In your layout file, include the @gdprjs directive somewhere inside your <body> tag.

You can then use the directive @gdpr('category') which acts as an if statement based on whether or not the user has accepted the cookie.

You can publish the package's config to config/gdpr.php with php artisan vendor:publish.

The default categories for cookies are:

You can change this in your published config, along with the cookie name and lifetime.

You can disable the plugin by setting GDPR_ENABLED to false in your .env. file.

Frontend

Provided the @gdprjs directive is present, you can manipulate the gdpr settings via javascript.

The package binds a laravelGdpr object to the window object. Allowing you to work with the package from there.

It's best to reload the page once you're done changing these settings in order for the user's configuration to come into effect.

The laravelGdpr object has two methods inside it:

laravelGdpr.get() will return the user's entire config.

laravelGdpr.set(category, value) accepts two parameters, category and value. value should be boolean.

The package is frontend-agnostic, allowing you to use your own CSS and JS to construct the GDPR permissions modal.

When one of your toggles or checkboxes is changed, you will need to call the laravelGdpr.set() method.

Quick Example:

There is a full example Vue component available on codesandbox


All versions of laravel-gdpr with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0|^9.0
illuminate/view Version ^7.0|^8.0|^9.0
illuminate/cookie Version ^7.0|^8.0|^9.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 senses/laravel-gdpr contains the following files

Loading the files please wait ....