gregoryduckworth/encryptable
最新稳定版本:1.0.2
Composer 安装命令:
composer require gregoryduckworth/encryptable
包简介
A simple trait to make attributes encrypted in the database
README 文档
README
Encryptable is a trait for Laravel that adds simple encryptable functions to Eloquent Models.
Encryptable allows you to encrypt data as in enters the database and decrypts it on its retrieval.
Installation
Simple add the package to your composer.json file and run composer update.
"gregoryduckworth/encryptable": "1.*",
Usage
Add the trait to your model and your encryptable rules.
use GregoryDuckworth\Encryptable\EncryptableTrait; class User extends Authenticatable { use EncryptableTrait; /** * Encryptable Rules * * @var array */ protected $encryptable = [ 'name', 'email', ]; ... }
Now, whenever you interact with the model, the name and email will automatically be encrypted and decrypted between your frontend and the database.
Contributing
Anyone is welcome to contribute. Fork, make your changes and then submit a pull request.
统计信息
- 总下载量: 52.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-20