PHPackages                             nickdekruijk/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. nickdekruijk/cookie-consent

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

nickdekruijk/cookie-consent
===========================

A simple cookie accept popup for EU laws

3.1.0(2mo ago)170MITPHPPHP ^8.2

Since Sep 3Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nickdekruijk/cookie-consent)[ Packagist](https://packagist.org/packages/nickdekruijk/cookie-consent)[ Docs](https://www.nickdekruijk.nl/packages/cookie-consent)[ RSS](/packages/nickdekruijk-cookie-consent/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

Cookie Consent for Laravel
==========================

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

According to EU laws visitors should opt-in for all non essential cookies. This package adds a simple 'Accept Cookies' popup to your Laravel Application.

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

[](#installation)

To install package use

```
composer require nickdekruijk/cookie-consent

```

Publish the config file in case you want to customize it

```
php artisan vendor:publish --provider=NickDeKruijk\\CookieConsent\\CookieConsentServiceProvider

```

Frontend
--------

[](#frontend)

Add this to every view/page where you want to show the popup

```
@include('cookieconsent::show')
```

And wrap any code that places tracking cookies/pixels/code with the `cookieConsentAccepted()` helper, for example like this:

```
@if (cookieConsentAccepted())
// Your tracking code here
@endif
```

And style the popup as you like, for example:

```
.cookieconsent-container {position:fixed;bottom:0;left:0;right:0;background-color:red;text-align:center;padding:50px;z-index:9999;color:#fff}
.cookieconsent-close {position:absolute;top:0;right:0;color:red;font-size:50px;padding:10px;line-height:.7;font-weight:bold;display:block}
.cookieconsent-button {display:inline-block;padding:10px 20px;border:2px solid #fff;border-radius:5px;text-decoration:none;color:inherit;margin:10px}
.cookieconsent-button:hover {background-color:rgba(255,255,255,0.5)}
.cookieconsent-button-accept {background-color:#fff;color:red}
.cookieconsent-button-accept:hover {background-color:rgba(255,255,255,0.8)}
```

Changing text/localization
--------------------------

[](#changing-textlocalization)

To change te tekst/buttons/info link copy the files from  to /resources/lang/vendor/cookieconsent/ file and edit where needed.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~186 days

Recently: every ~100 days

Total

14

Last Release

70d ago

Major Versions

1.1.2 → 2.0.02020-06-17

2.7.0 → 3.0.02025-03-18

PHP version history (2 changes)1.0.0PHP &gt;=7.0.0

3.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b01fc7c2c39bbe8f87b4afa70ffe1cf2bb787310e1d22fcfed6ae527d4573bb?d=identicon)[nickdekruijk](/maintainers/nickdekruijk)

---

Top Contributors

[![nickdekruijk](https://avatars.githubusercontent.com/u/607302?v=4)](https://github.com/nickdekruijk "nickdekruijk (27 commits)")

---

Tags

laravelcookiescookiegdprconsentcookiewall

### Embed Badge

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

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

###  Alternatives

[whitecube/laravel-cookie-consent

Register, configure and ask for cookies consent in a EU-compliant way.

496674.9k2](/packages/whitecube-laravel-cookie-consent)[statikbe/laravel-cookie-consent

Cookie consent modal for EU

219416.5k](/packages/statikbe-laravel-cookie-consent)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[scify/laravel-cookie-guard

A Laravel package that provides a Cookies consent floating window and publishes the Cookies for the different consent categories

14318.4k](/packages/scify-laravel-cookie-guard)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)[martin-schenk/laravel-cookie-consent

GDPR-compliant cookie consent system with minimal dependencies for Laravel 11 and 12

112.1k](/packages/martin-schenk-laravel-cookie-consent)

PHPackages © 2026

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