PHP code example of dedecube / laravel-legal-consent

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

    

dedecube / laravel-legal-consent example snippets

bash
php artisan vendor:publish --tag="legal-consent-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="legal-consent-config"
 php
'allowed_document_types' => [
    'privacy-policy',
    'terms-of-use',
],
 php
$legalDocument = [
    "id" => 1,
    "type" => "privacy-policy",
    "body" => "The privacy policy's very long text",
    "notes" => "",
    "published_at" => "2021-01-01",
    "updated_at" => "2021-01-01",
    "created_at" => "2021-01-01",
];