PHPackages                             macsidigital/laravel-setting - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. macsidigital/laravel-setting

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

macsidigital/laravel-setting
============================

2.1.0(5y ago)0487MITPHPPHP ^7.3CI failing

Since Dec 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/MacsiDigital/laravel-setting)[ Packagist](https://packagist.org/packages/macsidigital/laravel-setting)[ Docs](https://github.com/macsidigital/laravel-setting)[ GitHub Sponsors](https://github.com/MacsiDigital)[ RSS](/packages/macsidigital-laravel-setting/feed)WikiDiscussions master Synced yesterday

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

Laravel Setting
===============

[](#laravel-setting)

Configs in the database
-----------------------

[](#configs-in-the-database)

[![Header Image](https://github.com/MacsiDigital/repo-design/raw/master/laravel-setting/header.png)](https://github.com/MacsiDigital/repo-design/raw/master/laravel-setting/header.png)

 [![tests badge](https://github.com/MacsiDigital/laravel-setting/workflows/Tests/badge.svg)](https://github.com/MacsiDigital/laravel-setting/actions?query=workflow%3ATests) [![version badge](https://camo.githubusercontent.com/936ac26ed324bca799d7601006c1520ae580e659761811c31d46660e987719e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616373696469676974616c2f6c61726176656c2d73657474696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/macsidigital/laravel-setting) [![downloads badge](https://camo.githubusercontent.com/dfe36d063e20897bfb24a8005fdf4285f5b060f0ec26976f2d60e134a0119e4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d616373696469676974616c2f6c61726176656c2d73657474696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/macsidigital/laravel-setting)

A setting package to save settings to the db and access them through config.

Support us
----------

[](#support-us)

We invest a lot in creating [open source packages](https://macsidigital.co.uk/open-source), and would be grateful for a [sponsor](https://github.com/sponsors/MacsiDigital) if you make money from your product that uses them.

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

[](#installation)

This package can be used in Laravel 6.0 or higher.

You can install the package via composer:

```
composer require macsidigital/laravel-setting
```

You must publish the migration with:

```
php artisan vendor:publish --tag="setting-migrations"
```

Usage
-----

[](#usage)

You can save groups and settings like so

```
$group = Group::create([
    'identifier' => "test",
    'name' => "Test Settings",
    'description' => "Test Settings and other things"
]);
$item = Item::make(['key' => 'mailchimp', 'name' => 'Mailchimp Key', 'description' => 'Your Mailchimp API key so we can enable communication with your Mailchimp account']);
$group->items()->save($item);
```

As we utilise Eloquent you can use any Eloquent functions. For example, do the following to retrieve a setting group.

```
Group::where('identifier', 'membership')->first();
```

We are linked to the items in the normal relationship way

```
foreach(Group::where('identifier', 'membership')->first()->items){
	// do something
}
```

Auto loading
------------

[](#auto-loading)

There's an autoload field, which if set will automatically load the settings into config

```
$group = Group::create([
    'identifier' => "test",
    'name' => "Test Settings",
    'description' => "Test Settings and other things",
    'autoload' => true
]);
$item = Item::make(['key' => 'mailchimp.api', 'name' => 'Mailchimp Key', 'description' => 'Your Mailchimp API key so we can enable communication with your Mailchimp account', 'autoload' => true]);
$group->items()->save($item);

// Access with
config('test.mailchimp.api');
```

This will be automatically loaded when the Setting Service Provider is booted.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Colin Hall](https://github.com/colinhall17)
- [MacsiDigital](https://github.com/MacsiDigital)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~25 days

Recently: every ~8 days

Total

12

Last Release

2072d ago

Major Versions

1.0.6 → 2.0.02020-08-06

PHP version history (2 changes)1.0.0PHP ^7.3

1.0.6PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/134dcd0c87f691d2f351f4bff03eb390871de1992f1a79ecf034b4ac53b4ca71?d=identicon)[MacsiDigital](/maintainers/MacsiDigital)

---

Top Contributors

[![colinhall17](https://avatars.githubusercontent.com/u/5073205?v=4)](https://github.com/colinhall17 "colinhall17 (27 commits)")

---

Tags

hacktoberfestSettingsmacsidigitalconfigslaravel-setting

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/macsidigital-laravel-setting/health.svg)

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

###  Alternatives

[sajadsdi/laravel-setting-pro

Easy settings management for laravel framework

1315.9k](/packages/sajadsdi-laravel-setting-pro)[edvinaskrucas/settings

Persistent settings package for Laravel framework.

22483.1k1](/packages/edvinaskrucas-settings)[efriandika/laravel-settings

Laravel 5 Persistent Settings

6039.6k1](/packages/efriandika-laravel-settings)[oriceon/laravel-settings

Laravel 5 persistent settings

207.1k1](/packages/oriceon-laravel-settings)

PHPackages © 2026

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