pinfort/laravel-cookie-confirm

Any website cannot use cookie without agree.

Installs: 23

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/pinfort/laravel-cookie-confirm

v1.0.0 2018-06-25 07:15 UTC

This package is auto-updated.

Last update: 2025-10-10 17:39:18 UTC


README

Any website cannot use cookie without agree.

Basic Usage

Installation

composer require pinfort/laravel-cookie-confirm

Attention: Perhaps it is necessary to change the minimum stability of the composer...

Publish files

php artisan vendor:publish

You will find three new files.

  • resources/lang/vendor/CookieConfirm/en/cookie_confirm.php
  • resources/lang/vendor/CookieConfirm/ja/cookie_confirm.php
  • resources/views/vendor/CookieConfirm/confirm.blade.php
    • This file is main view.
    • You can edit this freely.

Enable library

Add middleware to your kernel

in App\Http\Kernel.php near the line 38

 protected $middlewareGroups = [
    'web' => [
        ......
+       \Pinfort\LaravelCookieConfirm\Middleware\Confirm::class,
    ],
 ......
 ];