PHPackages                             satheez/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. satheez/laravel-settings

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

satheez/laravel-settings
========================

This is my package laravel-settings

v1.0(3y ago)09[4 PRs](https://github.com/Satheez/laravel-settings/pulls)MITPHPPHP ^8.1CI passing

Since Jul 22Pushed 1w ago1 watchersCompare

[ Source](https://github.com/Satheez/laravel-settings)[ Packagist](https://packagist.org/packages/satheez/laravel-settings)[ Docs](https://github.com/satheez/laravel-settings)[ RSS](/packages/satheez-laravel-settings/feed)WikiDiscussions main Synced 4w ago

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

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

[](#laravel-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b42eb94987ee337357e0025c102f4bf5993be49f298c2f4f75a8077b17e4a862/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7361746865657a2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/satheez/laravel-settings)[![CI](https://camo.githubusercontent.com/7c8fb48f45c23e181a7c6999364c81a9068b927393e2ddcfcbe5a7033967ad66/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f5361746865657a2f6c61726176656c2d73657474696e67732f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d6369267374796c653d666c61742d737175617265)](https://github.com/Satheez/laravel-settings/actions/workflows/ci.yml)[![Total Downloads](https://camo.githubusercontent.com/95f3c7e4d9f783dee6cd83904f8328d13bc681432e6aa4a31bfaefa316331efa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7361746865657a2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/satheez/laravel-settings)

A focused, database-backed key-value settings store for Laravel.

Requirements
------------

[](#requirements)

- PHP 8.3 or newer
- Laravel 12.60 or newer, or Laravel 13.10 or newer

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

[](#installation)

Install the package:

```
composer require satheez/laravel-settings
```

Publish and run the migration:

```
php artisan vendor:publish --tag=laravel-settings-migrations
php artisan migrate
```

Publish the configuration when the defaults need to be changed:

```
php artisan vendor:publish --tag=laravel-settings-config
```

Usage
-----

[](#usage)

Inject the settings contract into application services:

```
use Satheez\LaravelSettings\Contracts\Settings;

final readonly class UpdateCheckoutConfiguration
{
    public function __construct(private Settings $settings) {}

    public function handle(): void
    {
        $this->settings->set('checkout.enabled', true);
    }
}
```

The contract provides:

```
$settings->get('checkout.enabled', false);
$settings->set('checkout.enabled', true);
$settings->setMany([
    'checkout.enabled' => true,
    'checkout.countries' => ['LK', 'US'],
]);
$settings->has('checkout.enabled');
$settings->forget('checkout.enabled');
$settings->all();
```

`all()` returns an associative array sorted by key. `forget()` returns whether a row was deleted.

The facade is available when dependency injection is not practical:

```
use Satheez\LaravelSettings\Facades\Settings;

Settings::set('checkout.enabled', true);

$enabled = Settings::get('checkout.enabled', false);
```

Supported Values
----------------

[](#supported-values)

Settings may contain JSON-safe values:

- `null`
- booleans
- integers and finite floats
- valid UTF-8 strings
- nested arrays containing supported values

Objects, resources, non-finite floats, and invalid UTF-8 strings are rejected with an `UnsupportedSettingValue` exception.

Stored `null`, `false`, `0`, `0.0`, empty strings, and empty arrays are real values. The default passed to `get()` is returned only when the key is absent.

Encryption
----------

[](#encryption)

New values are encrypted by default with Laravel's application encrypter. Each stored payload records whether it is encrypted, so changing the global setting does not make existing version 2 rows unreadable.

```
LARAVEL_SETTINGS_ENCRYPTION_ENABLED=true
```

Keep `APP_KEY` stable. Data encrypted with a previous key cannot be recovered unless that key remains configured through Laravel's key rotation support.

Cache
-----

[](#cache)

Database payloads and missing-key lookups are cached by default:

```
LARAVEL_SETTINGS_CACHE_ENABLED=true
LARAVEL_SETTINGS_CACHE_STORE=
LARAVEL_SETTINGS_CACHE_PREFIX=laravel-settings
LARAVEL_SETTINGS_CACHE_TTL=3600
```

Writes refresh affected cache entries. Deletes and legacy migrations invalidate them. Cache backend failures are not swallowed.

Database Configuration
----------------------

[](#database-configuration)

The default table is `settings` on the application's default connection:

```
LARAVEL_SETTINGS_DB_CONNECTION=
LARAVEL_SETTINGS_TABLE=settings
```

The configured table must contain the columns created by the package migration.

Upgrading From Version 1
------------------------

[](#upgrading-from-version-1)

Version 2 reads existing plain and encrypted version 1 rows without modifying them. Review [UPGRADING.md](UPGRADING.md), then validate the conversion:

```
php artisan laravel-settings:migrate --dry-run
```

Rewrite legacy rows after the dry run succeeds:

```
php artisan laravel-settings:migrate
```

Use `--force` for non-interactive production deployments and `--chunk=500` to control read batch size. The command is transactional and idempotent.

The version 1 helpers and `LaravelSettings` facade remain available as deprecated compatibility wrappers. New code should use the contract or `Settings` facade.

Testing
-------

[](#testing)

```
composer check
composer test-coverage
```

Security
--------

[](#security)

Review [SECURITY.md](SECURITY.md) before reporting a vulnerability.

License
-------

[](#license)

The MIT License. See [LICENSE.md](LICENSE.md).

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance64

Regular maintenance activity

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6590c21841f4323f7322cb865bc535b1b58b00b636aba0c3bcc08a1b1f53819c?d=identicon)[Satheez](/maintainers/Satheez)

---

Top Contributors

[![satheez](https://avatars.githubusercontent.com/u/11453046?v=4)](https://github.com/satheez "satheez (29 commits)")[![Satheez](https://avatars.githubusercontent.com/u/11453046?v=4)](https://github.com/Satheez "Satheez (28 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![isatheez](https://avatars.githubusercontent.com/u/252316041?v=4)](https://github.com/isatheez "isatheez (1 commits)")

---

Tags

laravellaravel-settingssatheez

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k90](/packages/nativephp-mobile)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[nativephp/desktop

NativePHP for Desktop

39742.4k8](/packages/nativephp-desktop)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)

PHPackages © 2026

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