motivo/cookie-consent 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

motivo/cookie-consent

Composer 安装命令:

composer require motivo/cookie-consent

包简介

README 文档

README

Add a cookie consent to your website with the levels of 'Functional', 'Analysis', 'Tracking'.

Installation

Install this package using composer:

composer require motivo/cookie-consent

Auto-discovery is enabled, so the package will register itself with Laravel.

Config

This package comes with a config file, to publish this file run the following command:

php artisan vendor:publish --provider="Motivo\CookieConsent\CookieConsentServiceProvider"

Usage

The package offers a blade file which you can include with @include('cookieConsent::cookie_consent'). Add this file where you want to show the notification. Preferable somewhere in the root of you application.

To check if the user has consented and to what level you can use class \Motivo\CookieConsent\CookieConsent or the facade \CookieConsent.

The following methods are available:

  • \CookieConsent::isFunctional() - Check if the user has consented to functional
  • \CookieConsent::isAnalysis() - Check if the user has consented to analysis
  • \CookieConsent::isTracking() - Check if the user has consented to tracking
  • \CookieConsent::getConsent() - Get an array of what the user has consented to
  • \CookieConsent::hasConsent() - Check if the user has consented

The package will automatically register a route to store the choise of the user in a cookie. The cookie will be stored for 1 year.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固