# spatie/laravel-cookie-consent

Make your Laravel app comply with the crazy EU cookie law

Repository: https://github.com/spatie/laravel-cookie-consent
Canonical: https://ross.abutalabs.com/products/laravel-cookie-consent
Homepage: https://freek.dev/503-make-your-laravel-app-comply-with-the-crazy-eu-cookie-law
Language: PHP
License: MIT
License Family: permissive
Topics: laravel, php, cookie, eu, javascript
Last push: 2026-06-26T06:59:01+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 57, longevity 100
- inputs: {"age_days": 3719, "days_push": 68, "days_rel": 79, "gap_med": 239.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1499, forks 137 (observed 2026-08-28T04:04:54.100298+00:00)

## What it is
A Laravel package by Spatie that adds a simple, customizable cookie consent banner to help sites comply with the EU cookie law. It displays a dialog on first visit, sets a consent cookie, and hides the banner thereafter.

## Use cases
- add a cookie consent banner to a laravel site
- comply with the eu cookie law
- show a cookie notice dialog to first-time visitors
- customize cookie consent message text and styling
- remember user cookie consent across requests

## When to choose
- you need a lightweight, simple consent banner for a Laravel app
- you only need basic accept-and-remember behavior
- you want a well-maintained Spatie package with easy Blade integration

## When to avoid
- you need a decline option or granular consent categories like necessary/marketing
- you must block trackers and cookies before consent is given
- you need full GDPR/TTDSG compliance verified by legal standards

## Facets
- artifact type: library
- maturity: active
- function: ui-components, middleware, templating
- domain: web-development, privacy, legal
- platform: php
- tags: cookie-consent, eu-cookie-law, gdpr, banner, spatie, laravel-package, laravel, web-server

## Member repositories
- spatie/laravel-cookie-consent (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:54.100298+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:33:03.642874+00:00, confidence not recorded.
  - readme: https://github.com/spatie/laravel-cookie-consent (fetched 2026-08-28T04:04:54.100298+00:00, sha 799f251a8cbc)
  - homepage: https://freek.dev/503-make-your-laravel-app-comply-with-the-crazy-eu-cookie-law (fetched 2026-08-29T11:38:06.847415+00:00, sha b056508070be)
  - site_page: https://freek.dev/about (fetched 2026-08-29T11:38:06.856999+00:00, sha e0ef9dccbb05)
- Data as of 2026-08-30T08:39:29.467469+00:00.
