tsubasarcs / laravel-privacier
Taiwan privacy policy record.
1.2.0
2018-12-22 08:04 UTC
Requires
- php: >=7.0
- laravel/framework: ^5.3
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: ^7.0
README
This package provides to record user assent privacy policy date with Laravel
Installation
Install by composer
$ composer require tsubasarcs/laravel-privacier
Registing Service Provider and Aliases
If you are using laravel 5.5 or above, you can use auto discover also, you don't need put in service provider to app.php
.
<?php //app.php 'providers' => [ \Tsubasarcs\Privacier\Providers\PrivacyServiceProvider::class, ], 'aliases' => [ 'Privacier' => \Tsubasarcs\Privacier\Facades\Privacier::class, ],
Run the following on your terminal to publish the migrations:
$ php artisan vendor:publish --provider="Tsubasarcs\Privacier\Providers\PrivacyServiceProvider" --tag="migrations"
If you want to change some parameter, you can run the following on your terminal to publish the config:
$ php artisan vendor:publish --provider="Tsubasarcs\Privacier\Providers\PrivacyServiceProvider" --tag="config"
Usage
Laravel-privacier provides two routes for store user confirm Privacy Policy and set privacy cookie for guest after confirm Privacy Policy.
route('privacy.store') // /privacy/store route('privacy.set_cookie') // /privacy/set_cookie
Use Facade Privacier
Privacier::updateOrCreate(string $attribute_key, array $values); //return model Privacier::existUid($uid); //return bool Privacier::exists($attribute); //return bool
License
Laravel-privacier is open-sourced software licensed under the MIT license.