Skip to content

EverRest/laravel-encrypt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LARAVEL-ENCRYPT

  • Use trait for your models when you want to hash attribute, in the database type of field for the attribute should be TEXT:

  • Example for Model:

use Illuminate\Database\Eloquent\Casts\Attribute;

...implements ...IModelUseEncryptedAttributes{
use ModelUseEncryptedAttributes;
...
    public function attributeOne() :Attribute
    {
        return $this->encryptedAttribute();
    }
...
    public function attributeTwo() :Attribute
    {
        return $this->encryptedAttribute();
    }
...
  • Attribute will automatically been hashed for save/update and uhashed when you will initialize the model

About

Laravel encrypt/decrypt library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%