Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/larapack/attribute-encryption
Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.
https://github.com/larapack/attribute-encryption
Last synced: about 2 months ago
JSON representation
Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.
- Host: GitHub
- URL: https://github.com/larapack/attribute-encryption
- Owner: larapack
- License: mit
- Created: 2015-11-27T10:24:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-04T09:13:40.000Z (almost 9 years ago)
- Last Synced: 2024-09-19T15:47:14.796Z (4 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```
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
```