PHP code example of bkc-media / twill-cookie-consent

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

    

bkc-media / twill-cookie-consent example snippets


return [
    /*
     * The cookie name in which we store which cookie id's the user has consented to.
     */
    'cookie_name' => 'tcc_cookie_consent',

    /*
     * Set the cookie duration in minutes.  Default is 60 * 24 * 365.
     */
    'cookie_lifetime' => 60 * 24 * 365,

    /*
     * Set primary color for cookie consent accept all buttons, default is green.
     */
    'primary_color' => '#65A30D',
];

@
 
@@
bash \
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-assets" --force 
bash \ 
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-config"
bash \ 
php artisan vendor:publish --provider="BKCmedia\TwillCookieConsent\TwillCookieConsentServiceProvider" --tag="twill-cookie-consent-translations"
bash 
php artisan migrate