PHPackages                             taylornetwork/model-encryption - 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. [Security](/categories/security)
4. /
5. taylornetwork/model-encryption

ActiveLibrary[Security](/categories/security)

taylornetwork/model-encryption
==============================

Adds encryption to Laravel models using Laravel's built in encryption

1.0.0(9y ago)112PHPPHP &gt;=5.4.0

Since Nov 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/taylornetwork/model-encryption)[ Packagist](https://packagist.org/packages/taylornetwork/model-encryption)[ RSS](/packages/taylornetwork-model-encryption/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Model Encryption Trait
======================

[](#model-encryption-trait)

This is a trait for Laravel that overrides the default getter and setters to encrypt and decrypt the values using Laravel's builtin encrypt and decrypt functions.

Install
-------

[](#install)

Via Composer

```
$ composer require taylornetwork/model-encryption
```

Usage
-----

[](#usage)

Include `Encryptable` trait in any model you want to add encryption and add a `$encryptable` property with an array of attributes to encrypt/decrypt.

```
use TaylorNetwork\ModelEncryption\Encryptable;

class DummyModel extends Model
{
    use Encryptable;

    /**
     * Model attributes to encrypt/decrypt
     *
     * @var array
     */
    protected $encryptable = [
        'dummy_attribute'
    ];

    // Code

}
```

When accessing any property, the Encryptable trait will determine if the attribute is in the `$encryptable` array, if so, encrypt/decrypt. Otherwise get/set as normal.

Credits
-------

[](#credits)

- Main Author: [Sam Taylor](https://github.com/taylornetwork)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3506d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83340094473f0bf5b2cf062bf394df221a52a30aa0e21cd0a77302977d6393ce?d=identicon)[samueljtaylor](/maintainers/samueljtaylor)

---

Top Contributors

[![samyrataylor](https://avatars.githubusercontent.com/u/15961687?v=4)](https://github.com/samyrataylor "samyrataylor (3 commits)")

### Embed Badge

![Health badge](/badges/taylornetwork-model-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/taylornetwork-model-encryption/health.svg)](https://phpackages.com/packages/taylornetwork-model-encryption)
```

###  Alternatives

[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

1.0k494.9k2](/packages/akaunting-laravel-firewall)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)

PHPackages © 2026

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