LaravelPackages.net
Acme Inc.
Toggle sidebar
pinfort/laravel-cookie-confirm

Any website cannot use cookie without agree.

23
2
v1.0.0
About pinfort/laravel-cookie-confirm

pinfort/laravel-cookie-confirm is a Laravel package for any website cannot use cookie without agree.. It currently has 2 GitHub stars and 23 downloads on Packagist (latest version v1.0.0). Install it with composer require pinfort/laravel-cookie-confirm. Discover more Laravel packages by pinfort or browse all Laravel packages to compare alternatives.

Last updated

laravel-cookie-confirm

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,
    ],
 ......
 ];

Star History Chart