jetiradoro/laravel-encrypt-model
Laravel trait to transparently encrypt specified Eloquent model attributes before saving to the database and automatically decrypt them when accessed. Install via Composer, add the Encryptable trait, and list encrypted fields in the $encryptable array.
This component allows you encrypt data before insert in database, and auto decrypt when you get the attribute
composer require jetiradoro/laravel-encrypt-model
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
How can I help you explore Laravel packages today?