tsubasarcs/laravel-privacier
Composer 安装命令:
composer require tsubasarcs/laravel-privacier
包简介
Taiwan privacy policy record.
README 文档
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.
统计信息
- 总下载量: 769
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-21