2017 © Pedro Peláez
 

library model-encryption

Adds encryption to Laravel models using Laravel's built in encryption

image

taylornetwork/model-encryption

Adds encryption to Laravel models using Laravel's built in encryption

  • Wednesday, November 16, 2016
  • by taylornetwork
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Model Encryption Trait

This is a trait for Laravel that overrides the default getter and setters to encrypt and decrypt the values using Laravel's builtin encrypt and decrypt functions., (*1)

Install

Via Composer, (*2)

``` bash $ composer require taylornetwork/model-encryption, (*3)


## Usage Include `Encryptable` trait in any model you want to add encryption and add a `$encryptable` property with an array of attributes to encrypt/decrypt. ``` php use TaylorNetwork\ModelEncryption\Encryptable; class DummyModel extends Model { use Encryptable; /** * Model attributes to encrypt/decrypt * * @var array */ protected $encryptable = [ 'dummy_attribute' ]; // Code }

When accessing any property, the Encryptable trait will determine if the attribute is in the $encryptable array, if so, encrypt/decrypt. Otherwise get/set as normal., (*4)

Credits

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

16/11 2016

dev-master

9999999-dev

Adds encryption to Laravel models using Laravel's built in encryption

  Sources   Download

The Requires

 

by Sam Taylor

16/11 2016

1.0.0

1.0.0.0

Adds encryption to Laravel models using Laravel's built in encryption

  Sources   Download

The Requires

 

by Sam Taylor