PHP code example of quebecstudio-mods / laravel-consent-kit

1. Go to this page and download the library: Download quebecstudio-mods/laravel-consent-kit 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/ */

    

quebecstudio-mods / laravel-consent-kit example snippets


'categories' => [
    'necessary' => [
        '> 'Nécessaires'],
        'cookies' => [
            'session' => ['name' => 'laravel_session', 'purpose' => ['en' => 'Keeps your session.'], 'duration' => ['en' => 'Session']],
        ],
    ],
    'statistics' => [
        'label' => ['en' => 'Statistics', 'fr' => 'Statistiques'],
        'cookies' => [
            'ga' => ['name' => '_ga', 'provider' => 'Google', 'purpose' => ['en' => 'Distinguishes visitors.'], 'duration' => ['en' => '2 years']],
        ],
    ],
],



return [
    'texts' => ['accept' => 'J’accepte'],
];
bash
php artisan vendor:publish --tag=cookie-consent-lang
bash
php artisan vendor:publish --tag=cookie-consent-views