Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Cookie Consent Laravel Package

jeffersongoncalves/laravel-cookie-consent

Simple Laravel cookie consent banner with GDPR/CCPA-friendly preferences. Drop-in head/body includes, optional view publishing for customization, and settings stored in the database via spatie/laravel-settings with helper access for runtime updates.

View on GitHub
Deep Wiki
Context7
v4.0.0

Security

Drop Laravel 11 support (EOL, unpatched). Require laravel/framework: ^12.61.1|^13.12.0 to fix:

  • GHSA-crmm-hgp2-wgrp — Temporary Signed URL Path Confusion
  • GHSA-5vg9-5847-vvmq — CRLF injection in default email validation rule

Breaking change: Laravel 11 is no longer supported.

v3.0.2

What's Changed

  • Add Laravel 13.x support in composer.json
  • Add orchestra/testbench ^11.0 for Laravel 13 testing
v3.0.1

Changes

  • Remove translations section from README
  • Add all content settings properties to the available settings table in README
v2.0.0

Breaking Changes

  • Configuration migrated from config/cookie-consent.php to database via spatie/laravel-settings
  • The config file has been removed. All settings are now stored in the database.

Migration Guide

  1. Update the package:

    composer require jeffersongoncalves/laravel-cookie-consent:^2.0
    
  2. Run migrations to create the settings in the database:

    php artisan migrate
    
  3. Delete your old config/cookie-consent.php file (no longer used).

  4. If you had custom values in the config file, update them via code:

    $settings = cookie_consent_settings();
    $settings->position = 'top-right';
    $settings->popup_background = '#000000';
    $settings->save();
    

What's New

  • Dynamic configuration - All settings stored in database, changeable at runtime
  • Settings class - CookieConsentSettings with 15 typed properties for type-safe access
  • Helper function - cookie_consent_settings() for convenient access in views and code
  • Settings migration - All defaults match previous config file values
  • Publishable migrations - --tag=cookie-consent-settings-migrations

Available Settings

Property Type Default
css_url string CDN cookieconsent CSS
js_url string CDN cookieconsent JS
content_href ?string null
content_close string ❌
popup_background string #696969
popup_text string #FFFFFF
popup_link string #FFFFFF
button_background string transparent
button_border string #f8e71c
button_text string #f8e71c
highlight_background string #f8e71c
highlight_border string #f8e71c
highlight_text string #000000
position string bottom-left
theme string block

Full Changelog: https://github.com/jeffersongoncalves/laravel-cookie-consent/compare/v1.1.1...v2.0.0

v1.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/jeffersongoncalves/laravel-cookie-consent/compare/v1.1.1...v1.2.0

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor