Download the PHP package martinschenk/livewire-cookie-consent without Composer

On this page you can find all versions of the php package martinschenk/livewire-cookie-consent. 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 livewire-cookie-consent

Laravel Livewire Cookie-Consent Modal

Latest Version on Packagist Total Downloads

With this package there will be set no (Google Marketing & Analytics) Cookies on your website, until the user has accepted the Cookie Policy. (Except essential and funtionality cookies). All of this, because of the crazy EU Cookie Law.

Livewire Cookie Consent is a Livewire component that provides Opt-In Cookie Modals. The user can choose between

Special:

Requirements

Laravel Jetstream with Livewire

Jetstream should only be installed into new Laravel applications. Attempting to install Jetstream into an existing Laravel application will result in unexpected behavior and issues

Installation

If you haven't installed Jetstream and Livewire

And now install the package

Register the package in /config/app.php

Finalizing The Installation

After installing Jetstream, you should install and build your NPM dependencies and migrate your database:

Include Livewire and vite directives

Include this into your welcome.blade.php, landing page or any other base template you use.

Include link

Normaly in the footer of your web-page, include this link. It will open the cookie modal to change preferences.

Publish the views and logo

The design is done with Tailwind. You can edit and adapt the files. You will find the views in resources/views/vendor/livewire-cookie-consent

Now it should work

Do just

and you should see popup the modal if you reload your webpage.

Publish the rest if you want to

Dialog texts and languages

If you want to modify the text shown in the dialog you can publish the lang-files with this command:

This will publish the f.e. english language file to lang/vendor/livewire-cookie-consent/en/texts.php .

Config file

Be careful changing the config values, because the Google Tag Manager is using them. Only change them if you know what you do.

This is the content of the published config-file. You'll find it in /config/livewire-cookie-consent.php

Configure Google Tag Manager

If you want to use Google Tag Manager, you will find an example Container script for configuration of GTM here

Example Container for GTM:

You can import or merge this GTM Container into your GTM account. Here you can find the GTM Documentation for importing a Container. Its possible that you have to change the GTM-Code in the GTM Container to your own GTM-Code.

Once configured your Google Tag Manager, you have to insert the Google Tag Manager Code in the HEAD section of your website this way (between @livewireStyles and @vite...):

Example:

Replace GTM-YOURKEY with your Google Tag Manager Key.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

This package is based on the one from spatie: https://github.com/spatie/laravel-cookie-consent and on statikbe: https://github.com/statikbe/laravel-cookie-consent

License

The MIT License (MIT). Please see License File for more information.


All versions of livewire-cookie-consent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
livewire/livewire Version ^2.0
wire-elements/modal Version ^1.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 martinschenk/livewire-cookie-consent contains the following files

Loading the files please wait ....