PHPackages                             gregoryduckworth/encryptable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. gregoryduckworth/encryptable

ActiveLibrary[Database &amp; ORM](/categories/database)

gregoryduckworth/encryptable
============================

A simple trait to make attributes encrypted in the database

1.0.2(6y ago)1953.5k↓39.7%2[3 issues](https://github.com/gregoryduckworth/Encryptable/issues)1MITPHPPHP &gt;=5.4.0

Since Oct 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/gregoryduckworth/Encryptable)[ Packagist](https://packagist.org/packages/gregoryduckworth/encryptable)[ RSS](/packages/gregoryduckworth-encryptable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)DependenciesVersions (4)Used By (1)

Encryptable, an ecryptable trait for Laravel
============================================

[](#encryptable-an-ecryptable-trait-for-laravel)

Encryptable is a trait for Laravel that adds simple encryptable functions to Eloquent Models.

Encryptable allows you to encrypt data as in enters the database and decrypts it on its retrieval.

Installation
============

[](#installation)

Simple add the package to your `composer.json` file and run `composer update`.

```
"gregoryduckworth/encryptable": "1.*",

```

Usage
=====

[](#usage)

Add the trait to your model and your encryptable rules.

```
use GregoryDuckworth\Encryptable\EncryptableTrait;

class User extends Authenticatable
{
	use EncryptableTrait;

	/**
	 * Encryptable Rules
	 *
	 * @var array
	 */
	protected $encryptable = [
		'name',
		'email',
	];

...
}
```

Now, whenever you interact with the model, the `name` and `email` will automatically be encrypted and decrypted between your frontend and the database.

Contributing
------------

[](#contributing)

Anyone is welcome to contribute. Fork, make your changes and then submit a pull request.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~606 days

Total

3

Last Release

2331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cab14bc2b88feb8bd98f56637a91c50e2ba47a81489703f457a8bcb4729b743?d=identicon)[gregoryduckworth](/maintainers/gregoryduckworth)

---

Top Contributors

[![gregoryduckworth](https://avatars.githubusercontent.com/u/2647926?v=4)](https://github.com/gregoryduckworth "gregoryduckworth (2 commits)")

---

Tags

laraveldatabaseeloquentencrypt

### Embed Badge

![Health badge](/badges/gregoryduckworth-encryptable/health.svg)

```
[![Health](https://phpackages.com/badges/gregoryduckworth-encryptable/health.svg)](https://phpackages.com/packages/gregoryduckworth-encryptable)
```

###  Alternatives

[betterapp/laravel-db-encrypter

Provides database model attribute encryption/decryption

365650.4k8](/packages/betterapp-laravel-db-encrypter)[czim/laravel-filter

Filter for Laravel Eloquent queries, with support for modular filter building

9175.1k3](/packages/czim-laravel-filter)[weebly/laravel-mutate

Mutate Laravel attributes

1356.1k](/packages/weebly-laravel-mutate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
