PHPackages                             fundamental-studio/laravel-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. fundamental-studio/laravel-encryptable

ActiveLibrary

fundamental-studio/laravel-encryptable
======================================

Laravel Encryptable addon for easy encrypt/decrypt database values with as many as 4 lines of code.

01[1 PRs](https://github.com/fundamental-studio/laravel-encryptable/pulls)PHP

Since Jan 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fundamental-studio/laravel-encryptable)[ Packagist](https://packagist.org/packages/fundamental-studio/laravel-encryptable)[ RSS](/packages/fundamental-studio-laravel-encryptable/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Encryptable by Fundamental Studio Ltd.
==============================================

[](#laravel-encryptable-by-fundamental-studio-ltd)

Laravel Encryptable addon for easy encrypt/decrypt database values with as many as 4 lines of code.

- Single trait to use within all your models.
- Specify all attributes you want or you do not want to encrypt.
- Automatically encrypts the data on create/update.
- Automatically decrypts the values on retrieve and attribute access.
- Can be used with all available databases. Please, be aware of the length of your data.
- Respects both: the casts and the dates fields.
- Under the hood, it uses the Crypt trait from Laravel.
- It respects the casts and mutations of your attributes.

Made with love and code by [Fundamental Studio Ltd.](https://www.fundamental.bg)

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

[](#installation)

The package is compatible with Laravel 7+ version.

Via composer:

```
$ composer require fundamental-studio/laravel-encryptable
```

After installing, the package should be auto-discovered by Laravel. That's it. You are up &amp; running and ready to go.

Documentation and Usage instructions
------------------------------------

[](#documentation-and-usage-instructions)

The usage of our package is pretty seamless and easy. First of all, you need to use the proper namespace for our package:

```
use Fundamental\Encryptable\Encryptable;

```

After that, use the trait inside your Eloquent Model, like this:

```
class User extends Model
{
    use Encryptable;

    // The rest of your model.
}
```

Then, you can specify the attributes you want to encrypt or just those that you do not want to:

```
protected $encryption = [
    'attribute_1', 'attribute_2', 'attribute_3'
];
```

You can also specify:

```
protected $encryptAll = true;
```

And the use the skipEncryption rule for those which should be ommitted.

```
protected $skipEncryption = [
    'attribute_4', 'attribute_5'
];
```

By default, the id and the timestamp fields are ommitted.

Methods
-------

[](#methods)

The package is as simple as possible. It contains a trait, which is overriding the default setAttribute and getAttributeValue methods. You can find more about them at [Laravel API Documentation](https://laravel.com/api/7.x/Illuminate/Database/Eloquent/Model.html).

There aren't any public exposed methods you should use.

Changelog
---------

[](#changelog)

All changes are available in our Changelog file.

Support
-------

[](#support)

For any further questions, feature requests, problems, ideas, etc. you can create an issue tracker or drop us a line at

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

[](#contributing)

Read the Contribution file for further information.

Credits
-------

[](#credits)

- Konstantin Rachev
- Vanya Ananieva

The package is bundled and contributed to the community by Fundamental Studio Ltd.'s team.

Issues
------

[](#issues)

If you discover any issues, please use the issue tracker.

Security
--------

[](#security)

If your discover any security-related issues, please email  or  instead of using the issue tracker.

License
-------

[](#license)

The MIT License(MIT). See License file for further information and reading.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfec0a16612b7177a93f4c2b8a4515352fa595e5e604254fdca83ad84211ddfa?d=identicon)[konstantinrachev](/maintainers/konstantinrachev)

---

Top Contributors

[![konstantinrachev](https://avatars.githubusercontent.com/u/7881742?v=4)](https://github.com/konstantinrachev "konstantinrachev (6 commits)")

### Embed Badge

![Health badge](/badges/fundamental-studio-laravel-encryptable/health.svg)

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

PHPackages © 2026

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