承接 riclep/cookie-law 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

riclep/cookie-law

Composer 安装命令:

composer require riclep/cookie-law

包简介

A very basic cookie law package for legacy Laravel 4 projects

README 文档

README

Shows a dialog with a message and button to accept cookies. The default name of the acceptance cookie is: laravel_cookie_acceptance. You are responsible for implementing logic based on their acceptance!

###Chacking acceptance with Blade

@if (isset($_COOKIE[Config::get('cookie-law::cookie-law.cookie_name')]))
	// Cookie is accepted to do stuff here 
@endif

###Installation

composer require riclep/cookie-law

Add the Service Provider

'RicLeP\CookieLaw\CookieLawServiceProvider', to config/app

Include the Blade view in your template near the bottom.

@include('cookie-law::dialog')

If you want to edit anything then publish the config file

php artisan config:publish riclep/cookie-law

To create the cookies page copy the controller and view stubs from the package and adjust them to fit the site. You can then add the following line to the routes file:

Route::get(Config::get('cookie-law::cookie-law.cookie_url'), 'CookiesController@view');

To override the wording create a language file in app/lang/packages/{locale}/cookie-law/lang.php with the contents:

<?php

return array (
	'message' => '',
	'accept-button' => '',
	'reject-button' => '',
	'customise-button' => '',

	'details' => '',
	'categories' => array(
		'' => '', 
		'' => '', 
		//e.g. 'Analytics cookies' => ''
	),
	'accepted' => '',
	'rejected' => '',
);

###JavaScript and styling

This package comes with no default styling but uses BEM style classes.

/* The container element */
.cookie-law {}

/* Class applied via JS when the accept button is hit - use this to hide the dialog */
.cookie-law--accepted {}


/* Inner element should you want to the container to span but fix the width of the contents */
.cookie-law__inner {}

/* Container for the message to be shown */
.cookie-law__message {}

/* The accept button styling */
.cookie-law__button {}

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固