Skip to content

jetiradoro/laravel-encrypt-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Encrypt data before insert database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages