kduma/eloquent-encryptable

This package is abandoned and no longer maintained. No replacement package was suggested.

Adds possibility to encrypt fields in Laravel Eloquent models.

Maintainers

Package info

github.com/kduma-OSS/LV-eloquent-encryptable

pkg:composer/kduma/eloquent-encryptable

Statistics

Installs: 2 076

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 1

v1.3.0 2024-11-11 18:31 UTC

This package is auto-updated.

Last update: 2026-04-08 12:25:16 UTC


README

This package is deprecated and no longer maintained.

Since Laravel 8, the framework includes built-in encrypted casts which provide the same functionality natively:

protected $casts = [
    'secret_field' => 'encrypted',
    'secret_array' => 'encrypted:array',
];

The built-in solution offers better type support, integration with the cast system, and is actively maintained as part of the framework. Please migrate to native encrypted casts.

L5-eloquent-encryptable

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI

Adds possibility to encrypt fields in Laravel Eloquent models.

Check full documentation here: opensource.duma.sh/libraries/deprecated/eloquent-encryptable

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