PHP code example of ekoukltd / laraconsent

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

    

ekoukltd / laraconsent example snippets


    //Grouping of admin web routes
    'routes'     => [
        'admin' => [
            //Admin web routes should only be available to admins
            'prefix'     => 'consent-admin',
            'middleware' => ['web','auth']
        ],
        'user'  => [
            //User routes should be available to any logged in user
            'prefix'     => 'consent',
            'middleware' => ['web']
        ],
    ],
 bash
php artisan vendor:publish --provider="Ekoukltd\LaraConsent\LaraConsentServiceProvider" --tag="laraconsent.config"
 bash
php artisan vendor:publish --provider="Ekoukltd\LaraConsent\LaraConsentServiceProvider" --tag="laraconsent.views"
 bash
php artisan vendor:publish --provider="Ekoukltd\LaraConsent\LaraConsentServiceProvider" --tag="laraconsent.assets"
 bash
php artisan migrate
 php
'prefix'     => 'user-consent',
'middleware' => ['web','auth:admin,web']
 bash
resources/lang/vendor/laraconsent/en/admin.php
resources/lang/vendor/laraconsent/en/user.php
resources/lang/vendor/laraconsent/en.json