PHPackages                             mufasil/laravel\_model\_keys\_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. mufasil/laravel\_model\_keys\_encryption

ActiveLibrary[Security](/categories/security)

mufasil/laravel\_model\_keys\_encryption
========================================

This package is to encrypt the keys like 'Id' of your database.

01PHP

Since Aug 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/mufasil/laravel_model_keys_encryption)[ Packagist](https://packagist.org/packages/mufasil/laravel_model_keys_encryption)[ RSS](/packages/mufasil-laravel-model-keys-encryption/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Model Keys Encryption
=============================

[](#laravel-model-keys-encryption)

Easily encrypt your table 'Id' through the trait provides in this library.

It's very important to encrypt your **DB** values when you are exposing it to public. This package will ease your life in 2 easily steps.

**Note - this trait does not create DB columns for you. You must create your own migrations**

Requirements
============

[](#requirements)

This package requires Laravel 5.6. Earlier versions of Laravel have a different model implementation that is not compatible with this package.

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

[](#installation)

```
composer require mufasil/laravel_model_keys_encryption

```

Usage
=====

[](#usage)

Add the trait to your model
---------------------------

[](#add-the-trait-to-your-model)

You'll only need to include the columns you want to encrypt.

This example will encrypt the `id` attribute of `user` table.

```
use Mufasil\KeyEncryption\Traits\Encryptable;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    use Encryptable;

    protected static $encryptable = [
        'id',
    ];
}
```

That's it. Enjoy...

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22917708?v=4)[Mufasil](/maintainers/mufasil)[@mufasil](https://github.com/mufasil)

### Embed Badge

![Health badge](/badges/mufasil-laravel-model-keys-encryption/health.svg)

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

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

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