Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```