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

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

kolirt/laravel-settings
=======================

Package for settings

2.1.0(9mo ago)3452MITPHPPHP &gt;=8.1

Since Jul 27Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/kolirt/laravel-settings)[ Packagist](https://packagist.org/packages/kolirt/laravel-settings)[ Docs](https://github.com/kolirt/laravel-settings)[ Fund](https://www.buymeacoffee.com/kolirt)[ RSS](/packages/kolirt-laravel-settings/feed)WikiDiscussions v2 Synced 2mo ago

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

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

[](#laravel-settings)

Package for managing settings in a Laravel projects

Structure
---------

[](#structure)

- [Getting started](#getting-started)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Setup](#setup)
    - [Compatibility with Laravel Octane](#compatibility-with-laravel-octane)
- [Methods](#methods)
    - [Set value](#set-value)
    - [Get all values](#get-all-values)
    - [Get value](#get-value)
    - [Delete value](#delete-value)
    - [Flush cache](#flush-cache)
- [Console commands](#console-commands)
- [FAQ](#faq)
- [License](#license)
- [Other packages](#other-packages)

[ ![Buy Me A Coffee](https://camo.githubusercontent.com/a6ebf9f3a5d0689c6d7449b0ea0c4ce75bbff5ef09b38babf991cb7a559f8774/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f617269616c2d79656c6c6f772e706e67)](https://www.buymeacoffee.com/kolirt)Getting started
---------------

[](#getting-started)

### Requirements

[](#requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 10

For lesser versions of Laravel or PHP, use the [v1](https://github.com/kolirt/laravel-settings/tree/v1)

### Installation

[](#installation)

```
composer require kolirt/laravel-settings
```

### Setup

[](#setup)

```
php artisan settings:install

php artisan migrate
```

### Compatibility with Laravel Octane

[](#compatibility-with-laravel-octane)

To ensure proper operation with Laravel Octane (RoadRunner or Swoole) and state synchronization across workers:

1. Use a shared cache store (e.g., 'redis') in `config/cache.php` or via `CACHE_STORE=redis` in `.env`.
2. Add `\Kolirt\Settings\Core\Setting::class` to the warm array in `config/octane.php` to initialize the singleton at worker startup: ```
    'warm' => [
        \Kolirt\Settings\Core\Setting::class,
    ],
    ```
3. Add `\Kolirt\Settings\Octane\FlushSettings::class` to the `listeners[OperationTerminated::class]` array in `config/octane.php` to reset internal state after each request: ```
     'listeners' => [
         OperationTerminated::class => [
             \Kolirt\Settings\Octane\FlushSettings::class,
         ]
     ],
    ```
4. Restart Octane after changes: `php artisan octane:reload`.

This ensures settings are reloaded from the shared cache or database for each request, keeping workers synchronized.

Console commands
----------------

[](#console-commands)

- `settings:install` - Install settings package
- `settings:publish-config` - Publish the config file
- `settings:publish-migrations` - Publish migration files
- `settings:flush-cache` - Flush cache

Methods
-------

[](#methods)

#### `set`

[](#set)

The `set` method is used to set a value in the settings

```
use Kolirt\Settings\Facades\Setting;

Setting::set('string', 'value');

Setting::set('array', [0, 1, 2]);
Setting::set('array.0', 'new value with index 0');
```

#### `all`

[](#all)

The `all` method is used to get all settings

```
use Kolirt\Settings\Facades\Setting;

Setting::all();
/**
 * Returns
 *
 * [
 *   'string' => 'value',
 *   'array' => ['new value with index 0', 1, 2]
 * ]
 */
```

#### `get`

[](#get)

The `get` method is used to get a value from the settings

```
use Kolirt\Settings\Facades\Setting;

Setting::get('string'); // 'value'

Setting::get('array'); // ['new value with index 0', 1, 2]
Setting::get('array.0'); // 'new value with index 0'

// or via helper

setting('string'); // 'value'

setting('array'); // ['new value with index 0', 1, 2]
setting('array.0'); // 'new value with index 0'
```

#### `delete`

[](#delete)

The `delete` method is used to delete a value from the settings

```
use Kolirt\Settings\Facades\Setting;

Setting::delete('string');

Setting::delete('array'); // delete all array values
Setting::delete('array.0'); // delete array value with index 0
```

#### `flushCache`

[](#flushcache)

The `flushCache` method is used to flush the cache

```
use Kolirt\Settings\Facades\Setting;

Setting::flushCache();
```

FAQ
---

[](#faq)

Check closed [issues](https://github.com/kolirt/laravel-settings/issues) to get answers for most asked questions

License
-------

[](#license)

[MIT](LICENSE.txt)

Other packages
--------------

[](#other-packages)

Check out my other packages on my [GitHub profile](https://github.com/kolirt)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance58

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Recently: every ~0 days

Total

9

Last Release

270d ago

Major Versions

1.2.0 → 2.0.02024-08-12

v1.x-dev → 2.0.12025-03-21

### Community

Maintainers

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

---

Top Contributors

[![kolirt](https://avatars.githubusercontent.com/u/11573343?v=4)](https://github.com/kolirt "kolirt (24 commits)")

---

Tags

laravelsettingssettings-managementsettings-storagelaravelSettings

### Embed Badge

![Health badge](/badges/kolirt-laravel-settings/health.svg)

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

495805.1k7](/packages/akaunting-laravel-setting)

PHPackages © 2026

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