PHPackages                             bonk007/system-settings - 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. bonk007/system-settings

ActiveLibrary

bonk007/system-settings
=======================

Dynamic settings for application

v1.1.0(1y ago)363MITPHPPHP ^8.1|^8.2CI failing

Since Jun 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bonk007/laravel-settings)[ Packagist](https://packagist.org/packages/bonk007/system-settings)[ RSS](/packages/bonk007-system-settings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Laravel Settings
================

[](#laravel-settings)

[![Packagist Downloads](https://camo.githubusercontent.com/6901447543a3118c47e0435d17e2ab3426d4c41c27707d9fc3900a1605124d41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f6e6b3030372f73797374656d2d73657474696e6773)](https://camo.githubusercontent.com/6901447543a3118c47e0435d17e2ab3426d4c41c27707d9fc3900a1605124d41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f6e6b3030372f73797374656d2d73657474696e6773)[![GitHub License](https://camo.githubusercontent.com/e5ad6df2c6a117aa03c312d1ec3d697ddeabb185c2759a36e802bbab605d2a1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626f6e6b3030372f6c61726176656c2d73657474696e6773)](https://camo.githubusercontent.com/e5ad6df2c6a117aa03c312d1ec3d697ddeabb185c2759a36e802bbab605d2a1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626f6e6b3030372f6c61726176656c2d73657474696e6773)[![Packagist Stars](https://camo.githubusercontent.com/132fb8c49c9ccd5ddc273dc21a703e406e1c48e88ee1fac09dac5125485f5c06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f626f6e6b3030372f73797374656d2d73657474696e6773)](https://camo.githubusercontent.com/132fb8c49c9ccd5ddc273dc21a703e406e1c48e88ee1fac09dac5125485f5c06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f73746172732f626f6e6b3030372f73797374656d2d73657474696e6773)[![GitHub forks](https://camo.githubusercontent.com/58298a7989a8bfc92ba17921b9f4e51fffd1f48799b5c6babd5667d12de93b72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f626f6e6b3030372f6c61726176656c2d73657474696e6773)](https://camo.githubusercontent.com/58298a7989a8bfc92ba17921b9f4e51fffd1f48799b5c6babd5667d12de93b72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f626f6e6b3030372f6c61726176656c2d73657474696e6773)

1. [Install](#install)
2. [How to](#how-to)
    - [Set Value](#set-settings-value)
    - [Get Value](#get-settings-value)
    - [Remove Value](#remove-setting)
3. [Configurable Model](#configurable-model)
    - [How to Define](#how-to-define)
    - [How it works](#how-it-works)
4. [Accepted Value](#accepted-value)

Install
=======

[](#install)

Install the package using composer

```
composer require bonk007/system-settings

```

then run migration

```
php artisan migrate

```

that's all ⚡

How to
======

[](#how-to)

Set setting's value
-------------------

[](#set-settings-value)

```
settings()->set('.', );
```

example

```
settings()->set('global-settings.maintenance_scheduled_at', Carbon::parse('2024-07-01 00:00:00'));
```

if you need to set some value for specific configurable model (learn: what is configurable model)

```
settings()->for()
  ->set('.', );
```

example

```
settings()->for(\App\Models\Organization::find(6))
  ->set('invoice.number_format', 'INV/{SEQUENCE}/{MONTH}/{YEAR}');
```

or you can use

```
settings()->set('...', );
```

example

```
settings()->set('invoice.number_format.organizations.6', 'INV/{SEQUENCE}/{MONTH}/{YEAR}');
```

Get setting's value
-------------------

[](#get-settings-value)

```
settings('.', );
```

for specific configurable model

```
settings()->for()
  ->get('.', );
```

or using simple way

```
settings('...', )
```

example

```
settings('global-settings.maintenance_scheduled_at');
settings('invoice.number_format.organizations.6');
settings()->for(\App\Models\Organization::find(6))
  ->get('invoice.number_format');
```

Remove setting
--------------

[](#remove-setting)

```
settings->unset('.')
```

with specific configurable model

```
settings->unset('...')
```

or

```
settings()->for()
  ->unset('.');
```

example

```
settings()->unset('global-settings.maintenance_scheduled_at');
settings()->unset('invoice.number_format.organizations.6');
settings()->for(\App\Models\Organization::find(6))
  ->unset('invoice.number_format');
```

Configurable Model
==================

[](#configurable-model)

Configurable model is a Eloquent Model represents an instance that owns custom configurations value.

How to define
-------------

[](#how-to-define)

Model should implement `\Settings\Configurable::class` interface example

```
class User extends Model implements Configurable
{
  // ...
}
```

**Be careful**, using shortcut `settings()->set('...', );`, there is possibility you will store non-configurable model into settings table, then you can't use `settings()->for(\App\Models\Organization::find(6))` for any function.

How it works
------------

[](#how-it-works)

Configurable model will be stored as polymorphic relation at settings table. The field columns are `configurable_table` and `configurable_id`. By default `configurable_id` has `unsigned bigint` type, but you can change the type by define static variable `\Settings\Manager::$configurableMorphType` value with `uuid|int|string` at `AppServiceProvider` before you run `artisan migrate`.

```
class AppServiceProvider extends ServiceProvider
{
  public function register()
  {
    // ...
    \Settings\Manager::$configurableMorphType = 'uuid';
  }
}

```

Accepted Value
==============

[](#accepted-value)

- `string`
- `boolean`
- `double/float`
- `integer`
- `array`
- `\DatetimeInterface`
- Eloquent Model
- Model Collection
- Basic Collection

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance44

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

439d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/99862905869af6744acc047b2b4ad6e35e8c620d5a79caafd4c4ffdeee93f3ac?d=identicon)[bonk007](/maintainers/bonk007)

---

Top Contributors

[![bonk007](https://avatars.githubusercontent.com/u/792557?v=4)](https://github.com/bonk007 "bonk007 (10 commits)")

---

Tags

phplaravelsystem settings

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bonk007-system-settings/health.svg)

```
[![Health](https://phpackages.com/badges/bonk007-system-settings/health.svg)](https://phpackages.com/packages/bonk007-system-settings)
```

###  Alternatives

[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)

PHPackages © 2026

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