jonassiewertsen / statamic-cookie-consent
Statamic的cookie同意包装器,用于Spatie的'laravel-cookie-consent'包
v1.0-beta.4
2021-08-29 19:57 UTC
Requires
- php: ^7.4 || ^8.0
- illuminate/support: 6.* || 7.* || 8.*
- spatie/laravel-cookie-consent: 2.*
- statamic/cms: 3.*
This package is auto-updated.
Last update: 2024-08-29 05:18:51 UTC
README
此包基本上是对Spatie的Laravel Cookie Consent包的包装。
安装
使用composer拉取您的包
composer require jonassiewertsen/statamic-cookie-consent
样式
请记住编写一些CSS样式来设计同意横幅。
这些是默认类
<div class="js-cookie-consent cookie-consent"> <span class="cookie-consent__message"> Your experience on this site will be improved by allowing cookies. </span> <button class="js-cookie-consent-agree cookie-consent__agree"> Allow cookies </button> </div>
设置
禁用cookie同意
您可以在.env文件中禁用此包
COOKIE_CONSENT_ENABLED=false
发布语言文件
php artisan vendor:publish --provider="Spatie\CookieConsent\CookieConsentServiceProvider" --tag="lang"
发布视图
php artisan vendor:publish --provider="Spatie\CookieConsent\CookieConsentServiceProvider" --tag="views"
发布配置文件
php artisan vendor:publish --provider="Spatie\CookieConsent\CookieConsentServiceProvider" --tag="config"
许可
此包/插件是开源的。请随意贡献或以您喜欢的任何方式使用它!