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

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

macsidigital/laravel-cookie-consent
===================================

Laravel cookie consent package

3.0.1(5y ago)3731MITPHPPHP ^7.3|^8.0CI failing

Since Oct 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MacsiDigital/laravel-cookie-consent)[ Packagist](https://packagist.org/packages/macsidigital/laravel-cookie-consent)[ Docs](https://github.com/MacsiDigital/laravel-cookie-consent)[ GitHub Sponsors](https://github.com/MacsiDigital)[ RSS](/packages/macsidigital-laravel-cookie-consent/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (4)Versions (9)Used By (0)

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

[](#laravel-cookie-consent)

A little package for the EU cookie consent law
----------------------------------------------

[](#a-little-package-for-the-eu-cookie-consent-law)

[![Header Image](https://github.com/MacsiDigital/repo-design/raw/master/laravel-cookie-consent/header.png)](https://github.com/MacsiDigital/repo-design/raw/master/laravel-cookie-consent/header.png)

 [![tests badge](https://github.com/MacsiDigital/laravel-cookie-consent/workflows/Tests/badge.svg)](https://github.com/MacsiDigital/laravel-cookie-consent/actions?query=workflow%3ATests) [![version badge](https://camo.githubusercontent.com/6d55ed3c19c01c7c5b300bd8593ecd846e2633213104b433f1fd28e7264cecdd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616373696469676974616c2f6c61726176656c2d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/macsidigital/laravel-cookie-consent) [![downloads badge](https://camo.githubusercontent.com/aed0e99722eef48d4b1243d23bc8522563dd5ff81c9384783a5e4ea374614d9c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616373696469676974616c2f6c61726176656c2d636f6f6b69652d636f6e73656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/macsidigital/laravel-cookie-consent)

A little package to handle cookie consent. All EU sites or sites targeted at EU citizens must comply with the european law, requesting consent to add cookies to the users comupter.

Support us
----------

[](#support-us)

We invest a lot in creating [open source packages](https://macsidigital.co.uk/open-source), and would be grateful for a [sponsor](https://github.com/sponsors/MacsiDigital) if you make money from your product that uses them.

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

[](#installation)

This package can be used in Laravel 6.0 or higher.

You can install the package via composer:

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

We then need to install the assets:

```
php artisan cookieconsent:install
```

This will publish a config file, the views and language files

### AJAX Requests and Styling

[](#ajax-requests-and-styling)

Out of the box we use axios to make the AJAX request, this can be changed by editing the blade template.

We also use Tailwind CSS for styling, again this can be changed by editing the template.

If you want to use the defaults, then you will need to import the required dependencies.

Usage
-----

[](#usage)

To use we just need to add a blade include just before the end body tag

```
@include('cookieConsent::widget')
```

To amend the design just go into the resources views folder and amend 'widget.blade.php'. Note we have used inline styles so that we are not reliant on any design framework. But we would recommend changing this to use something like tailwind.

Finally the more info will try to direct to a route '/cookie-policy', you will need to create this route yourself in your routes file, as well as the template file that lists your cookie policy.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Colin Hall](https://github.com/colinhall17)
- [Macsi Digital](https://github.com/macsidigital)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

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 ~78 days

Recently: every ~137 days

Total

8

Last Release

1839d ago

Major Versions

1.0.3 → 2.0.02020-05-21

2.1.1 → 3.0.12021-05-01

PHP version history (2 changes)1.0.0PHP ^7.3

3.0.1PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/134dcd0c87f691d2f351f4bff03eb390871de1992f1a79ecf034b4ac53b4ca71?d=identicon)[MacsiDigital](/maintainers/MacsiDigital)

---

Top Contributors

[![colinhall17](https://avatars.githubusercontent.com/u/5073205?v=4)](https://github.com/colinhall17 "colinhall17 (14 commits)")

---

Tags

hacktoberfestlaravelcookie-consentmacsidigitallaravel-cookie-consent

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

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