PHPackages                             w3designweb/laravel-cookie-consent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. w3designweb/laravel-cookie-consent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

w3designweb/laravel-cookie-consent
==================================

This package for Laravel allows you to manage user cookies consents in compliance with privacy regulations.

v1.2.0(2y ago)01871MITPHPPHP &gt;=7.2|^8.0

Since May 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/w3designweb/laravel-cookie-consent)[ Packagist](https://packagist.org/packages/w3designweb/laravel-cookie-consent)[ Docs](https://github.com/w3designweb/laravel-cookie-consent)[ RSS](/packages/w3designweb-laravel-cookie-consent/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Cookie consent for Laravel
==========================

[](#cookie-consent-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6551afe582223a9d430644610d67af9ba9ac17c317930fb8286cfbed19a23781/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f773364657369676e7765622f6c61726176656c2d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/w3designweb/laravel-cookie-consent)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b490330151b1e02ffb73a368d1cae4d805f32a0e7cefdcd80b881981d9c3bf8d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f773364657369676e7765622f6c61726176656c2d636f6f6b69652d636f6e73656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/w3designweb/laravel-cookie-consent/?branch=master)[![Quality Score](https://camo.githubusercontent.com/77d52e9702b513b096886d8ebceefc88b46536fb8ec9f79ad67a5ec41db90088/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f773364657369676e7765622f6c61726176656c2d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/w3designweb/laravel-cookie-consent)[![Build](https://camo.githubusercontent.com/9d2e329ccf5976f3556ca748dab0192f9eb4476c5c997d106a7030735ba1e019/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f773364657369676e7765622f6c61726176656c2d636f6f6b69652d636f6e73656e742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/w3designweb/laravel-cookie-consent/build-status/master)[![Total Downloads](https://camo.githubusercontent.com/e9b871112dc6361b5690732dda9db5db9a12f25e7abe02294ab1f24c05c4bdde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f773364657369676e7765622f6c61726176656c2d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/w3designweb/laravel-cookie-consent)

With this package it will be easy for you to declare all the cookies used on your website, asking for consent through a banner that will be activated automatically through a Laravel Middleware.

Each user can accept or not the different types of cookies, thus deciding whether to enable the related functions, and also can change the consents given over time.

Installation
------------

[](#installation)

Require the package with Composer:

```
composer require w3designweb/laravel-cookie-consent

```

### Laravel

[](#laravel)

For Laravel 5.4 and lower, add the service provider to `config/app.php`:

```
W3designweb\LaravelCookieConsent\LaravelCookieConsentServiceProvider::class,
```

### Lumen

[](#lumen)

Add the service provider to `bootstrap/app.php`:

```
$app->register(W3designweb\LaravelCookieConsent\LaravelCookieConsentServiceProvider::class);
```

Configuration
-------------

[](#configuration)

Then, add this configuration to your .env file to enable the cookie banner. By default the value is set to "true", but it will be sufficient to indicate "false" to not show the cookie banner.

```
COOKIE_CONSENT_ENABLED=true
COOKIE_CONSENT_NAME=your_cookie_consent_name
```

After that, add the middleware in the group of your choice, inside the App/Http/Kernel.php file, per example:

```
'web' => [
    ...
    W3designweb\LaravelCookieConsent\Http\Middleware\LaravelCookieConsent::class,
    ...
],
```

Publish the package files to manage your cookies list in the config file, the blade template on the view file and the assets in CSS and JS file:

```
php artisan vendor:publish --provider="W3designweb\LaravelCookieConsent\LaravelCookieConsentServiceProvider"
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~174 days

Total

4

Last Release

984d ago

PHP version history (2 changes)v1.1.0PHP &gt;=7.2

v1.2.0PHP &gt;=7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b00287c8fcfd67fbc63cd6f0092b9f98cea25a5c843338c81b3628da39ba7cce?d=identicon)[w3designweb](/maintainers/w3designweb)

---

Top Contributors

[![w3designweb](https://avatars.githubusercontent.com/u/38464194?v=4)](https://github.com/w3designweb "w3designweb (10 commits)")[![flavioski](https://avatars.githubusercontent.com/u/4485155?v=4)](https://github.com/flavioski "flavioski (6 commits)")

---

Tags

laravelpackagecookiegdprcookie-consentconsentcookie-bannercookie law

### Embed Badge

![Health badge](/badges/w3designweb-laravel-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/w3designweb-laravel-cookie-consent/health.svg)](https://phpackages.com/packages/w3designweb-laravel-cookie-consent)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k133.0M759](/packages/barryvdh-laravel-debugbar)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k2.3M65](/packages/fruitcake-laravel-debugbar)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

219426.2k](/packages/statikbe-laravel-cookie-consent)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
