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

Abandoned → [taki47/laravel-privacy-panel](/?search=taki47%2Flaravel-privacy-panel)Library

taki47/laravel-cookie-consent
=============================

Advanced Laravel GDPR cookie consent manager with categorized consent and automatic script blocking.

v1.0.5(1mo ago)173↓50%MITPHPPHP ^8.2

Since Oct 31Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/taki47/laravel-privacy-panel)[ Packagist](https://packagist.org/packages/taki47/laravel-cookie-consent)[ RSS](/packages/taki47-laravel-cookie-consent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Laravel Privacy Panel
=====================

[](#laravel-privacy-panel)

A modern, lightweight, and fully self-contained **GDPR-ready privacy panel** for Laravel.
Automatically detects, blocks, and manages analytics and marketing scripts with zero external dependencies.

---

Features
--------

[](#features)

- Automatic detection and blocking of tracking scripts
- Dynamic cookie categories (necessary / statistics / marketing)
- AJAX-based consent saving (no page reload)
- Google Consent Mode v2 support
- Cookie cleanup when consent is revoked
- Re-openable floating icon
- Artisan command for cache cleanup
- Simple publish and setup process
- Compatible with Laravel 10, 11, and 12+

---

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

[](#installation)

Install via Composer:

```
composer require taki47/laravel-privacy-panel

```

Publish assets:

```
php artisan vendor:publish --provider="Taki47\PrivacyPanel\PrivacyPanelServiceProvider" --tag=public

```

This will publish: public/vendor/privacy-panel/

Before going live, scan your site so the banner can display cookie details (name, purpose, expiry) correctly:

```
php artisan cookie:scan

```

**IMPORTANT:** Before running the scan, make sure that APP\_URL is set in your .env file to the website URL that the crawler needs to scan! Alternatively, you can pass the URL as an argument.

The `cookie:scan` command supports the following optional parameters:

- `{url? : (Optional) The website URL to scan, defaults to APP_URL}`
- `{--depth=2 : Crawl depth (default 2)}`
- `{--max-pages=100 : Maximum pages to crawl}`
- `{--fetch-external-js : Also fetch external JS files (may slow down)}`
- `{--delay=250 : Delay between requests in ms (politeness)}`

Include the consent banner in your base layout (for example layouts/app.blade.php):

```
@include('privacy-panel::banner')

```

Load the cookie script before any analytics scripts:

```

```

Artisan command
---------------

[](#artisan-command)

Clear cached cookie metadata and scan results:

```
php artisan cookie:clear-cache

```

Use --force to skip confirmation:

```
php artisan cookie:clear-cache --force

```

How it works
------------

[](#how-it-works)

Automatic script blocking Known analytics and marketing scripts are detected and converted to `` before execution.

User consent handling User preferences are saved via AJAX to the cookie-consent.store route.

Re-enabling approved scripts Scripts belonging to approved categories (e.g., statistics, marketing) are dynamically reactivated without page reload.

Consent updates and cleanup When a user revokes consent, the package deletes related cookies and updates Google Consent Mode accordingly.

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

[](#contributing)

Pull requests are welcome! Please follow PSR-12 coding standards and use English comments only.

License
-------

[](#license)

Released under the MIT License. © 2025 Lajos Takacs &lt;takiwebneked.hu&gt;

Support
-------

[](#support)

If you find this package useful, please give it a star on GitHub ⭐ Your support helps keep the project open and actively maintained.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

5

Last Release

50d ago

### Community

Maintainers

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

---

Top Contributors

[![taki47](https://avatars.githubusercontent.com/u/44288774?v=4)](https://github.com/taki47 "taki47 (2 commits)")

### Embed Badge

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

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

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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