PHP code example of kostantinoabate / complihance

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

    

kostantinoabate / complihance example snippets


'cookie_name' => 'complihance_consent',

'cookie_lifetime' => 60 * 24 * 365,

'cookie_policy_url' => '/cookie-policy',

'banner' => [
    'enabled' => true,
],

'cookie_configuration_version' => '1.0.0',

'granular_consent' => [
    'enabled' => false,
],

'consent_mode' => [
    'enabled' => true,
],

'cookie_configuration_version' => '1.0.1',

'granular_consent' => [
    'enabled' => true,
],

'consent_mode' => [
    'enabled' => true,
],
bash
php artisan complihance:install
bash
php artisan migrate
bash
php artisan vendor:publish --tag=complihance-data
txt
config/complihance.php
bash
php artisan vendor:publish --tag=complihance-data
bash
php artisan complihance:export-consents
bash
php artisan complihance:export-consents --from=2026-01-01 --to=2026-12-31
bash
php artisan complihance:retention
bash
php artisan complihance:retention --dry-run
bash
php artisan complihance:reset --force