Download the PHP package radosavleovac/laravel-consent-mode without Composer

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

Laravel Consent Mode

GDPR Compliant Google Consent Mode V2 for Laravel

This package provides an easy way to implement Google Consent Mode V2 in Laravel applications while complying with GDPR regulations. It supports TailwindCSS for styling and offers customizable cookie consent management.

🚀 Features

✅ Google Consent Mode V2 compliant ✅ Supports TailwindCSS for styling ✅ Easy integration with Laravel ✅ Customizable cookie categories ✅ Consent-based loading of Google Tag Manager (GTM) ✅ Multi-language support ✅ Publishable assets (JS, CSS, Views, and Config)


📌 Installation

1️⃣ Install the package via Composer

Run the following command in your Laravel project:

2️⃣ Publish the configuration file

After installation, publish the configuration file using:

This will create a configuration file at:

3️⃣ Publish assets (JS & CSS)

To publish the required JavaScript and CSS files, run:

This will place the assets in the public/js and public/css folders.

4️⃣ Publish translations (optional)

To publish language files for customization:

5️⃣ Publish views (optional)

If you want to override the default views:

This will copy the views to:


📖 Configuration

Edit the config/consent.php file to configure the cookie categories and default settings:


🚀 Usage

1️⃣ Add the consent banner

Include the following Blade directive in your main layout, near or in footer (e.g., resources/views/layouts/app.blade.php):

2️⃣ Add the Google Tag after head opening

2️⃣ Add the noscript Tag after body opening

🎯 Example: Handling Consent in JavaScript

When the user accepts all cookies, the following function is executed:


🔧 Customization

To enable visitors to change settings you can place a button in your code

To display map after user gave permission you can use


📄 License

This package is licensed under the MIT licence.

To do - tutorial how to setup Google Tag manager



All versions of laravel-consent-mode with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^11.41
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 radosavleovac/laravel-consent-mode contains the following files

Loading the files please wait ...