- Notifications
You must be signed in to change notification settings - Fork1
A Laravel package with an encryptable trait to manage encrypting database table fields
License
venturedrake/laravel-encryptable
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Automatically encrypt and decrypt database table fields.
You can install the package via composer:
composer require venturedrake/laravel-encryptable
You can publish the config file with:
php artisan vendor:publish --provider="VentureDrake\LaravelEncryptable\LaravelEncryptableServiceProvider" --tag="config"
Add the trait to your model and your encryptable rules.
<?phpnamespaceApp;useIlluminate\Database\Eloquent\Model;useVentureDrake\LaravelEncryptable\Traits\LaravelEncryptableTrait;class Personextends Model{use LaravelEncryptableTrait;/** * Laravel Encryptable Rules * * @var array */protected$encryptable = ['first_name','last_name', ];... }
Now when you store, update or read from the model the first_name and last_name fields will automatically be encrypted and decrypted.
composertestPlease seeCHANGELOG for more information on what has changed recently.
Please seeCONTRIBUTING for details.
Please reviewour security policy on how to report security vulnerabilities.
The MIT License (MIT). Please seeLicense File for more information.
About
A Laravel package with an encryptable trait to manage encrypting database table fields
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.