Download the PHP package zencule/cookie-banner without Composer
On this page you can find all versions of the php package zencule/cookie-banner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zencule/cookie-banner
More information about zencule/cookie-banner
Files in zencule/cookie-banner
Package cookie-banner
Short Description A modern, customizable cookie consent banner for Laravel and Statamic applications
License MIT
Informations about the package cookie-banner
Zencule Cookie Banner
A modern, customizable cookie consent banner for Laravel and Statamic applications. Built with Alpine.js and plain CSS (no Tailwind required).
Features
- 🎨 Modern, responsive design with plain CSS (no Tailwind required)
- ⚡ Smooth animations with Alpine.js
- 📊 Google Analytics integration
- 🔒 GDPR-compliant with essential/all cookies options
- 🎯 Works with both Laravel and Statamic
- ⚙️ Fully customizable through config
Installation
You can install the package via composer:
CSS
The package includes a plain CSS file for styling. To use the default styles, import or copy cookie-banner.css from the package's resources/ directory into your project and include it in your main CSS or HTML:
Or, if using a bundler:
Laravel
The package will automatically register its service provider.
Publish the configuration file:
Statamic
The package will automatically register as a Statamic addon.
Publish the configuration file:
Usage
Laravel
Add the cookie banner to your layout file:
Statamic
Add the cookie banner to your layout file:
Configuration
Configure the banner in config/cookie-banner.php:
Customization
Styling
The banner uses plain CSS classes by default. You can customize the appearance by:
-
Publishing the views:
-
Modifying the templates in:
- Laravel:
resources/views/vendor/cookie-banner/blade/banner.blade.php - Statamic:
resources/views/vendor/cookie-banner/antlers/banner.antlers.html
- Laravel:
- Editing the CSS file:
- Copy or import
resources/cookie-banner.cssand modify it as needed for your branding.
- Copy or import
Analytics
By default, the package supports Google Analytics. Set your Analytics ID in your .env file:
The script will only load after the user accepts all cookies.
Requirements
- PHP 8.1 or higher
- Laravel 10.0 or higher
- Statamic 4.0 or higher (for Statamic integration)
- Alpine.js
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Zencule
- All Contributors
License
The MIT License (MIT). Please see License File for more information.