cyrixbiz/cookie

关于使用Cookie的消息

dev-master 2020-10-21 15:09 UTC

This package is auto-updated.

Last update: 2024-09-21 23:50:49 UTC


README

一个使用Laravel的Cookie Law Info脚本
  • 使用此Cookie _ Law _ 脚本风险自负。请咨询律师获取更多信息。

安装ACL

  • Composer

    composer require cyrixbiz/cookie dev-master
  • 编辑config\app并添加以下行

    'providers' => [
    // ...
    cyrixbiz\cookie\CookieServiceProvider::class,
    // ...
    ];
  • 编辑App\Http\Kernel并添加以下行

    protected $middleware = [
      //
    \cyrixbiz\cookie\Http\Middleware\Cookie::class,

配置 - 文件

  • 启用/禁用Cookie信息

    'enable' => true | false
  • 选择你的机制 - 无JavaScript或有JavaScript

    'mechanism' => Redirect | Ajax
  • Cookie名称

    'name' => 'cyrixbiz_set_law_cookie',
  • 视图 _ 布局

    'layout' => 'CookieView::layout.message',
  • Cookie的有效期

    'life_time' => 60,
  • 视图标签 - 即时创建

    tag => '</ body>'
  • 回退

    fallback => 'https://google.de' | Fallback - Disallow Cookies
  • 外部jQuery

      //You can choose between extern script and manually installed jQuery
    
    'extern_jQuery' => true,
  • 外部bootstrap

      //You can choose between extern script and manually installed bootstrap
    
    'extern_bootstrap' => true,