PHPackages                             devmaster10/aesencrypt - 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. devmaster10/aesencrypt

ActiveLibrary[Security](/categories/security)

devmaster10/aesencrypt
======================

Laravel MySql AES Encrypt/Decrypt

523415[2 issues](https://github.com/devmaster10/mysql-aes-encrypt/issues)[1 PRs](https://github.com/devmaster10/mysql-aes-encrypt/pulls)PHP

Since May 18Pushed 5y agoCompare

[ Source](https://github.com/devmaster10/mysql-aes-encrypt)[ Packagist](https://packagist.org/packages/devmaster10/aesencrypt)[ RSS](/packages/devmaster10-aesencrypt/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

- [Installation](#1install-the-package-via-composer)
- [Configure Provider](#2configure-provider)
- [Updating your Eloquent Models](#updating-your-eloquent-models)
- [Creating tables to support encrypt columns](#creating-tables-to-support-encrypt-columns)
- [Set encryption key in .env file](#set-encryption-key-in-env-file)

Laravel MySql AES Encrypt/Decrypt
=================================

[](#laravel-mysql-aes-encryptdecrypt)

Laravel 5.x Database Encryption in mysql side, use native mysql function AES\_DECRYPT and AES\_ENCRYPT
Auto encrypt and decrypt signed fields/columns in your Model
Can use all functions of Eloquent/Model
You can perform the operations "=&gt;, &lt;',' between ',' LIKE ' in encrypted columns

1.Install the package via Composer:
-----------------------------------

[](#1install-the-package-via-composer)

```
$ composer require devmaster10/aesencrypt:dev-master
```

2.Configure provider
--------------------

[](#2configure-provider)

If you're on Laravel 5.4 or earlier, you'll need to add and comment line on config/app.php:

```
'providers' => array(
    // Illuminate\Database\DatabaseServiceProvider::class,
    DevMaster10\\AESEncrypt\\Database\\DatabaseServiceProviderEncrypt::class
)
```

Updating Your Eloquent Models
-----------------------------

[](#updating-your-eloquent-models)

Your models that have encrypted columns, should extend from ModelEncrypt:

```
namespace App\Models;

use DevMaster10\AESEncrypt\Database\Eloquent;

class Persons extends ModelEncrypt
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'tb_persons';

    /**
     * The attributes that are encrypted.
     *
     * @var array
     */
    protected $fillableEncrypt = [
        'name'
    ];

     /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
                'name',
                'description',
                ];
}
```

Creating tables to support encrypt columns
------------------------------------------

[](#creating-tables-to-support-encrypt-columns)

It adds new features to Schema which you can use in your migrations:

```
    Schema::create('tb_persons', function (Blueprint $table) {
        // here you do all columns supported by the schema builder
        $table->increments('id')->unsigned;
        $table->string('description', 250);
        $table ->unsignedInteger('created_by')->nullable();
        $table ->unsignedInteger('updated_by')->nullable();
    });

    // once the table is created use a raw query to ALTER it and add the BLOB, MEDIUMBLOB or LONGBLOB
    DB::statement("ALTER TABLE tb_persons ADD name MEDIUMBLOB after id");
```

});

Set encryption key in .env file
-------------------------------

[](#set-encryption-key-in-env-file)

```
APP_AESENCRYPT_KEY=yourencryptedkey
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/76e37f1b65c0209b401f092709ffc346b997ec8eb8387a59ce3eccd07d0bb195?d=identicon)[devmaster10](/maintainers/devmaster10)

---

Top Contributors

[![devmaster10](https://avatars.githubusercontent.com/u/38945076?v=4)](https://github.com/devmaster10 "devmaster10 (20 commits)")[![MarshallDez](https://avatars.githubusercontent.com/u/210487023?v=4)](https://github.com/MarshallDez "MarshallDez (14 commits)")

### Embed Badge

![Health badge](/badges/devmaster10-aesencrypt/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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