New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

larapack/attribute-hashing

Allows you to define what attributes in your Eloquent Model which should be hashed.
1,236 2
Install
composer require larapack/attribute-hashing
Latest Version:v1.0.0
License:MIT
Last Updated:Mar 4, 2016
Links: GitHub  ·  Packagist
Maintainer: marktopper

attribute-hashing

Allows you to define what attributes in your Eloquent Model which should be hashed.

Installing

Install using Composer composer require larapack/attribute-hashing 1.*.

Usage

First add the traits Manipulateable and Hashable to your Eloquent Model.

<?php

namespace App;

use Larapack/AttributeManipulating/Manipulateable;
use Larapack/AttributeHashing/Hashable;

class User
{
  use Manipulateable;
  use Hashable;
  
  /**
   * @var array List of attribute names which should be hashed
   */ 
  protected $hash = ['password']; // set the attribute names you which to hash
  
  //...
}

Now whenever you set the attribute password it will now be hashed.

Test:

$user = new App\User;
$user->password = 'secret';
echo $user->password // Here you will see the encrypted password

Related Packages

larapack/attribute-slugging

Allows your Eloquent Model to automatically generate a unique slug for a attribu...

2,031 5
larapack/attribute-manipulation

Allows multiple traits to manipulate with the attributes of an Eloquent Model.

3,188 4
pderas/shambles

A hashing library that will generate and add hashes to your laravel models.

40,617 0
larapack/attribute-encryption

Allows you to define what attributes in your eloquent model which should be encr...

1,936 3
ammardev/laravel-wp-hash-driver

Supports Wordpress passwords hashing and checking in Laravel's Hash facade.

9,412 16

Version History

Version Released License
v1.0.0 MIT