Skip to content

HGACreative/Encryptable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HGA Encryptable

This package works with Laravel to allow any model to have encryptable attribues encrypted and decrypted on-the-fly in a very eloquent/Laravel fashion.

We opt to ignore encrypting or decrypting null values when accessing and mutating attributes so that we can use Laravel's $model->whereNull() and $model->whereNotNull() query builder methods.

Use the Hgacreative\Encryptable\Encryptable trait within the relevant models and copy the following code:

/**
 * The attributes which should be encrypted in the database
 *
 * @var array
 */
protected $encryptable = [
    //
];

About

Useful trait to encrypt/decrypt sensitive attributes on the fly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages