PHPackages                             williamrox45/encrypt-model - 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. williamrox45/encrypt-model

ActiveLibrary[Security](/categories/security)

williamrox45/encrypt-model
==========================

The idea of this package is very simple; it is to add encryption to the model class attributes in an automated way.

v1.0.3(1y ago)04MITPHP

Since Sep 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/williamsilveira45/encrypt-model)[ Packagist](https://packagist.org/packages/williamrox45/encrypt-model)[ RSS](/packages/williamrox45-encrypt-model/feed)WikiDiscussions main Synced 1mo ago

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

Encrypt Model
=============

[](#encrypt-model)

Simple trait to add in your models if you want to save it encrypted in the database, e.g: Store credit cards or any sensible data.

Requirements
------------

[](#requirements)

Laravel 9+

Installation
------------

[](#installation)

`composer require williamrox45/encrypt-model`

Usage
-----

[](#usage)

```
use William\EncryptModel\EncryptModel;

class User extends Authenticatable
{
    use HasFactory;
    use Notifiable;
    use SoftDeletes;
    use EncryptModel; // name = "William";
$user->email = "will123@will123.com";

dump($user);
/**
 * These values will be save like this in the database
 *
 * name = eyJpdiI6ImxyeVRBMGZrdGV2TDE1N1BkdzhRbFE9PSIsInZhbHVlIjoiUEd0QjlNbzNLMDBidXYySUtnRHB4dz09IiwibWFjIjoiMWY2ZDhjZjVhMmY5Mzk1ZGJlZDlhZWEyODk1ODg4NzIzOTdlZWE5MGY3ODhjNmM1ZDUzOGY2MzM5ZjEzOWI3YSIsInRhZyI6IiJ9
 * email = eyJpdiI6InhqamlKQVIxalFEdFNuRDZqNnZZTHc9PSIsInZhbHVlIjoicmgrMktBcDJwUllvZzFEZ3h6VDd3dlhKZXBPSWNuMi9TcHYrYnBZb2wrVT0iLCJtYWMiOiI2MGM0YmI5Mzc1ZjkxZjFkY2VkNDE3MzIwZDRjYjQ5ODc4ZDc1N2JjYTU2MmExNGNkYTlmZjk3NTU4ODM1Y2M5IiwidGFnIjoiIn0
 */
dd($user->name, $user->email);
/**
 * name = William
 * email = will123@will123.com
 */
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Every ~0 days

Total

4

Last Release

603d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/415e1295072bd2601da78c433cce813bbca43c8f3cad6301743cfd67cced86a3?d=identicon)[williamrox45](/maintainers/williamrox45)

---

Top Contributors

[![williamsilveira45](https://avatars.githubusercontent.com/u/37221181?v=4)](https://github.com/williamsilveira45 "williamsilveira45 (1 commits)")

### Embed Badge

![Health badge](/badges/williamrox45-encrypt-model/health.svg)

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

###  Alternatives

[soved/laravel-gdpr

GDPR compliance with ease

299127.5k2](/packages/soved-laravel-gdpr)[masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

41254.5k](/packages/masterro-laravel-xss-filter)[enlightn/laravel-security-checker

A Laravel package to scan your dependencies for known security vulnerabilities.

51173.4k](/packages/enlightn-laravel-security-checker)[nickurt/laravel-pwned-passwords

PwnedPasswords for Laravel 11.x/12.x/13.x

187.5k](/packages/nickurt-laravel-pwned-passwords)[dgtlss/owaspadvisor

A Laravel package to help developers implement OWASP Top 10 security guidelines

327.1k](/packages/dgtlss-owaspadvisor)

PHPackages © 2026

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