larapack/attribute-encryption
Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.
1,936
3
| Install | |
|---|---|
composer require larapack/attribute-encryption |
|
| Latest Version: | v1.0.0 |
| License: | MIT |
| Last Updated: | Mar 4, 2016 |
| Links: | GitHub · Packagist |
Maintainer: marktopper
attribute-encryption
Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.
Installing
Install using Composer composer require larapack/attribute-encryption 1.*.
Usage
First add the traits Manipulateable and Encryptable to your Eloquent Model.
<?php
namespace App;
use Larapack/AttributeManipulating/Manipulateable;
use Larapack/AttributeEncryption/Encryptable;
class User
{
use Manipulateable;
use Encryptable;
/**
* @var array List of attribute names which should be encrypted
*/
protected $encrypt = ['password']; // set the attribute names you which to encrypt/decrypt
//...
}
Now whenever you set the attribute password it will now be encrypted and whenever you get the attribute it will be decrypted.
Test:
$user = new App\User;
$user->password = 'secret';
echo $user->getOriginalAttribute('password'); // Here you will see the encrypted password
dump($user); // Here you will see the encrypted password
echo $user->password; // Here you will see the decrypted password
Related Packages
fileinvite-org/laravel-database-encryption
A package for automatically encrypting and decrypting Eloquent attributes in Lar...
10,587
0
aes
attribute
attribute encryption
database
database encryption
db
decrypt
decryption
eloquent
eloquent encryption
encrypt
encryption
l5
laravel
laravel encryption
laravel5
laravel5 encryption
laravel55
laravel55 encryption
laravel56
laravel56 encryption
laravel57
laravel57 encryption
laravel58
laravel58 encryption
laravel6 encryption
laravel60
model
model encryption
mgpl2311/laravel-db-encrypter
Provides database model attribute encryption/decryption
5,680
0
attribute
database
database encrypter
database encryption
decrypt
decrypted
decryption
eloquent
encrypt
encrypter
encryption
laravel
laravel attribute encrypter
laravel attribute encryption
laravel database encrypter
laravel database encryption
laravel db encrypter
laravel db encryption
laravel model encrypter
laravel model encryption
betterapp/laravel-db-encrypter
Provides database model attribute encryption/decryption
688,261
362
attribute
database
database encrypter
database encryption
decrypt
decrypted
decryption
eloquent
encrypt
encrypter
encryption
laravel
laravel attribute encrypter
laravel attribute encryption
laravel database encrypter
laravel database encryption
laravel db encrypter
laravel db encryption
laravel model encrypter
laravel model encryption
payamjafari/laravel-db-encrypter
Provides database model attribute encryption/decryption
513
1
attribute
database
database encrypter
database encryption
decrypt
decrypted
decryption
eloquent
encrypt
encrypter
encryption
laravel
laravel attribute encrypter
laravel attribute encryption
laravel database encrypter
laravel database encryption
laravel db encrypter
laravel db encryption
laravel model encrypter
laravel model encryption
laravel mongodb attribute encrypter
mongodb
enflow/laravel-database-encryption
A package for automatically encrypting and decrypting Eloquent attributes in Lar...
2,229
1
aes
attribute
attribute encryption
database
database encryption
db
decrypt
decryption
elocrypt
elocryptfive
eloquent
eloquent aes
eloquent encryption
encrypt
encryption
l5
laravel
laravel encryption
laravel5
laravel5 aes
laravel5 encryption
laravel55
laravel55 encryption
laravel56
laravel56 encryption
laravel57
laravel57 encryption
laravel58
laravel58 encryption
laravel6 encryption
model
model encryption