PHPackages                             signifly/laravel-configurable - 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. [Database &amp; ORM](/categories/database)
4. /
5. signifly/laravel-configurable

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

signifly/laravel-configurable
=============================

Make your Eloquent models configurable.

v1.5.0(5y ago)53.6kMITPHPPHP ^7.3|^8.0

Since May 14Pushed 5y ago4 watchersCompare

[ Source](https://github.com/signifly/laravel-configurable)[ Packagist](https://packagist.org/packages/signifly/laravel-configurable)[ Docs](https://github.com/signifly/laravel-configurable)[ RSS](/packages/signifly-laravel-configurable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

Easily make your Eloquent models configurable
=============================================

[](#easily-make-your-eloquent-models-configurable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bad190559f245c2318060d4e0446b4080bff8bafe73b7023be19a348d170b24e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7369676e69666c792f6c61726176656c2d636f6e666967757261626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/signifly/laravel-configurable)[![Tests](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)[![StyleCI](https://camo.githubusercontent.com/a05ffc060ed2ec30da78c30c6ca0326a3bdd4337c0ccafaffafe3a504ffcba17/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131373536373333342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/117567334)[![Quality Score](https://camo.githubusercontent.com/415cceb3e4bd581794f14b2e616aeca41ed2d760f4dc3eabaa66e7f516462537/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7369676e69666c792f6c61726176656c2d636f6e666967757261626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/signifly/laravel-configurable)[![Total Downloads](https://camo.githubusercontent.com/553d974c5438e19c9a2696c82522f3d605e57b0bb73871d4d97ff24163c1a4cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7369676e69666c792f6c61726176656c2d636f6e666967757261626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/signifly/laravel-configurable)

The `signifly/laravel-configurable` package allows you to easily make your Eloquent models configurable.

Below is a small example of how to use it.

```
// Remember to add use statement
use Signifly\Configurable\Configurable;

class User
{
    use Configurable;

    // Remember to make `config` fillable
    protected $fillable = [
        'config',
    ];

    // Remember to add `config` to casts
    protected $casts = [
        'config' => 'array',
    ];
}
```

Adding the column to your table migration:

```
Schema::table('users', function (Blueprint $table) {
    $table->json('config')->nullable();
});
```

Now you would be able to configure your user model:

```
$user = User::find(1);
$user->config()->some_key = 'some val';
$user->config()->set('some_other_key', 'some other val');
$user->save();
```

Retrieving from your config is straightforward:

```
$user = User::find(1);
$user->config()->some_key; // returns some val
$user->config()->get('some_other_key'); // return some other val
```

Removing attributes from config can be done like this:

```
$user = User::find(1);
$user->config()->remove('some_key');
$user->save();
```

Checking if an attribute exists in the config:

```
$user = User::find(1);
$user->config()->has('some_key'); // returns true
```

Retrieving an attribute as a collection:

```
$user = User::find(1);
$user->config()->collect('some_key'); // returns Collection(['some val']);
```

You can also overwrite the config key:

```
// Remember to add use statement
use Signifly\Configurable\Configurable;

class User
{
    use Configurable;

    // Remember to make `settings` fillable
    protected $fillable = [
        'settings', 'extras',
    ];

    // Remember to add `settings` to casts
    protected $casts = [
        'settings' => 'array',
        'extras' => 'array',
    ];

    protected function getConfigKey()
    {
        return 'settings';
    }

    // or add a custom config attribute like this:
    public function getExtrasAttribute()
    {
        return new Config($this, 'extras');
    }
}
```

Documentation
-------------

[](#documentation)

Until further documentation is provided, please have a look at the tests.

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

[](#installation)

You can install the package via composer:

```
$ composer require signifly/laravel-configurable
```

The package will automatically register itself.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Morten Poul Jensen](https://github.com/pactode)
- [All contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 95.3% 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 ~95 days

Recently: every ~167 days

Total

12

Last Release

1871d ago

PHP version history (3 changes)v1.0.0PHP ^7.1

v1.4.0PHP ^7.2.5

v1.5.0PHP ^7.3|^8.0

### Community

Maintainers

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

---

Top Contributors

[![pactode](https://avatars.githubusercontent.com/u/5956778?v=4)](https://github.com/pactode "pactode (41 commits)")[![connors511](https://avatars.githubusercontent.com/u/527889?v=4)](https://github.com/connors511 "connors511 (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

configurableeloquentlaravelsettings

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/signifly-laravel-configurable/health.svg)

```
[![Health](https://phpackages.com/badges/signifly-laravel-configurable/health.svg)](https://phpackages.com/packages/signifly-laravel-configurable)
```

###  Alternatives

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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