kduma / L5-eloquent-encryptable by kduma

Adds possibility to encrypt fields in Laravel Eloquent models.
2,061
5
2
Package Data
Maintainer Username: kduma
Maintainer Contact: oss@krystian.duma.sh (Krystian Duma)
Package Create Date: 2015-01-31
Package Last Update: 2024-11-11
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:02:19
Package Statistics
Total Downloads: 2,061
Monthly Downloads: 13
Daily Downloads: 0
Total Stars: 5
Total Watchers: 2
Total Forks: 0
Total Open Issues: 1

L5-eloquent-encryptable

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI

Adds possibility to encrypt fields in Laravel Eloquent models.

Setup

Add the package to the require section of your composer.json and run composer update

"kduma/eloquent-encryptable": "^1.1"

Prepare models

In your model add following lines:

use \KDuma\Eloquent\Encryptable;
protected $encrypted=['list', 'of', 'fields', 'you', 'wan\'t', 'to', 'encrypt'];

Usage

It will be automaticly encrypting and decrypting fields defined in $encrypted property of your model.

Those fields must be string or text for longer values.

YOTTARAM

A special thanks to Jonathan Stavis, an original code creator that this package is based on.

Packagist

View this package on Packagist.org: kduma/eloquent-encryptable