albertgpdev / cookie-info-bar
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
This package is auto-updated.
Last update: 2025-06-06 03:26:39 UTC
README
Installation
composer require albertgpdev/cookie-info-bar
Laravel >5
Setup
Add ServiceProvider to the providers array in app/config/app.php
.
Albertgpdev\CookieInfoBar\CookieInfoBarServiceProvider::class,
It also supports package discovery for Laravel 5.5.
Configuration
Add COOKIE_INFO_BAR_ENABLED
, COOKIE_INFO_BAR_CUSTOMIZABLE
to .env file.
// You can also add this customizable options
COOKIE_INFO_BAR_TYPE='modal' or 'bar'
COOKIE_INFO_BAR_NAME
COOKIE_INFO_BAR_LIFETIME
Usage on your blade files
CookieInfoBar has two methods to use on the blade: @cookieInfoBar()
and @editCookies()
.
@cookieInfoBar()
is responsible for displaying the modal or the bar at the bottom.
@editCookies()
is an anchor that accepts a text as a parameter to go, for example from the footer to the edit screen once accepted or rejected.