jetiradoro / laravel-encrypt-model
Encrypt data before insert database
Package info
github.com/jetiradoro/laravel-encrypt-model
Type:laravel-package
pkg:composer/jetiradoro/laravel-encrypt-model
1.0
2019-02-01 12:09 UTC
Requires
- php: >=7.0
- illuminate/support: 5.*
Requires (Dev)
- orchestra/testbench: ~3.4.2|~3.5.0|~3.6.0|~3.7.0
- phpunit/phpunit: ^5.7|6.2|^7.0
This package is auto-updated.
Last update: 2026-03-01 00:12:41 UTC
README
This component allows you encrypt data before insert in database, and auto decrypt when you get the attribute
Installation
- With Composer : download files
composer require jetiradoro/laravel-encrypt-model
- In your model you need use Encryptable Trait and define $encryptable array with fields which you want encrypt.
- Example
class User extends Model
{
use Encryptable;
protected $encryptable = [
'cc',
'ss',
'phone',
];
}
...
This component has been inspired in https://laracasts.com/discuss/channels/laravel/encrypting-model-data article