2017 © Pedro Peláez
 

package attribute-encryption

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

image

larapack/attribute-encryption

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

  • Friday, March 4, 2016
  • by marktopper
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

attribute-encryption

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted., (*1)

Installing

Install using Composer composer require larapack/attribute-encryption 1.*., (*2)

Usage

First add the traits Manipulateable and Encryptable to your Eloquent Model., (*3)

<?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., (*4)

Test:, (*5)

$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

The Versions

04/03 2016

dev-master

9999999-dev

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

  Sources   Download

MIT

The Requires

 

laravel encrypt decrypt encryption package crypt attribute decryption larapack

27/11 2015

1.0.x-dev

1.0.9999999.9999999-dev

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

  Sources   Download

MIT

The Requires

 

laravel encrypt decrypt encryption package crypt attribute decryption larapack

27/11 2015

dev-develop

dev-develop

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

  Sources   Download

MIT

The Requires

 

laravel encrypt decrypt encryption package crypt attribute decryption larapack

27/11 2015

v1.0.0

1.0.0.0

Allows you to define what attributes in your eloquent model which should be encrypted and decrypted.

  Sources   Download

MIT

The Requires

 

laravel encrypt decrypt encryption package crypt attribute decryption larapack