PHP code example of code16 / cookie-consent

1. Go to this page and download the library: Download code16/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/ */

    

code16 / cookie-consent example snippets


php artisan vendor:publish --provider='Code16\CookieConsent\CookieConsentServiceProvider' --tag=assets --force

php artisan vendor:publish --provider="Code16\CookieConsent\CookieConsentServiceProvider" --tag=config

php artisan vendor:publish --provider="Code16\CookieConsent\CookieConsentServiceProvider" --tag=lang

[
    'cookie_categories' => [
        'system' => [
            '

[
    'manage' => [
        'title' => 'Manage cookies',
        'description' => 'About cookies...',
        'categories' => [
            'system' => [
                'title' => 'System cookies',
                'description' => "Description text about system cookies",
            ],
            'analytics' => [
                'title' => 'Analytics cookies',
                'description' => "Description text about analytics cookies",
            ],
        ],
    ]
];

    // in config/cookie-consent.php
    return [
        // ...
        'middleware' => 'cookie-consent.accepted'
    ];