jetiradoro / laravel-encrypt-model
Encrypt data before insert database
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-package
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: 2025-03-29 01:10:07 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