Looking to hire Laravel developers? Try LaraJobs

laravel-encrypt-model maintained by jetiradoro

Description
Encrypt data before insert database
Author
Last update
2019/02/01 13:20 (dev-master)
License
Downloads
16

Comments
comments powered by Disqus

Laravel Encrypt Manager

This component allows you encrypt data before insert in database, and auto decrypt when you get the attribute

Installation

  1. With Composer : download files
composer require jetiradoro/laravel-encrypt-model
  1. 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