LaravelPackages.net
Acme Inc.
Toggle sidebar
jetiradoro/laravel-encrypt-model

Encrypt data before insert database

16
1
1.0
About jetiradoro/laravel-encrypt-model

jetiradoro/laravel-encrypt-model is a Laravel package for encrypt data before insert database. It currently has 1 GitHub stars and 16 downloads on Packagist (latest version 1.0). Install it with composer require jetiradoro/laravel-encrypt-model. Discover more Laravel packages by jetiradoro or browse all Laravel packages to compare alternatives.

Last updated

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

Star History Chart