PHP code example of aonodevs / laravel-cookie-consent
1. Go to this page and download the library: Download aonodevs/laravel-cookie-consent library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
aonodevs / laravel-cookie-consent example snippets
return [
/*
* Use this setting to enable the cookie consent dialog.
*/
'enabled' => env('COOKIE_CONSENT_ENABLED', true),
/*
* Use this setting to add a refuse button on the dialog.
*/
'refuse_enabled' => env('COOKIE_CONSENT_REFUSE_ENABLED', false),
/*
* The name of the cookie in which we store if the user
* has agreed to accept the conditions.
*/
'cookie_name' => 'laravel_cookie_consent',
/*
* Set the cookie duration in days. Default is 365 * 1.
*/
'cookie_lifetime' => 365 * 1,
];
return [
'message' => 'Please be informed that this site uses cookies.',
'agree' => 'Allow cookies',
'refuse' => 'Refuse non-essential cookies',
];