PHP code example of tsubasarcs / laravel-privacier

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

    

tsubasarcs / laravel-privacier example snippets

 php


//app.php

'providers' => [
        \Tsubasarcs\Privacier\Providers\PrivacyServiceProvider::class,
    ],
    
'aliases' => [
        'Privacier' => \Tsubasarcs\Privacier\Facades\Privacier::class,
    ],
 php
route('privacy.store') // /privacy/store
route('privacy.set_cookie') // /privacy/set_cookie
 php
Privacier::updateOrCreate(string $attribute_key, array $values); //return model
Privacier::existUid($uid); //return bool
Privacier::exists($attribute); //return bool