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

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

centrex/laravel-settings
========================

Manage settings in laravel

v1.3.2(10mo ago)02.5k[4 PRs](https://github.com/centrex/laravel-settings/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI failing

Since Nov 19Pushed 1mo agoCompare

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

READMEChangelogDependencies (14)Versions (27)Used By (0)

Manage settings in Laravel
==========================

[](#manage-settings-in-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f4b6bf9fc8ef5e4d1d378d0b0c019f88037a0a5b075116f7794c118222981bbf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63656e747265782f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/laravel-settings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9ea54e09c61457416b70ac3e877af42d2dbbf5fb0e60c9374f03f7b6f4793a41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c61726176656c2d73657474696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/centrex/laravel-settings/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/459ee57aad7cf0cde12144c9d32bb402cb18db017910ac59f62a33f77db0a3d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63656e747265782f6c61726176656c2d73657474696e67732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/centrex/laravel-settings/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3644bdbb6de0399a184a6ddca2cca2cc5bce9ba64033cf6686b4a4ee86ad4738/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63656e747265782f6c61726176656c2d73657474696e67733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/centrex/laravel-settings)

Database-backed application settings with a caching layer, Laravel config integration, and convenient helper functions. Settings are stored in a `settings` table and cached forever until changed.

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

[](#installation)

```
composer require centrex/laravel-settings
php artisan vendor:publish --tag="laravel-settings-migrations"
php artisan migrate
```

Usage
-----

[](#usage)

### Via helper functions

[](#via-helper-functions)

```
// Get a setting (with optional default)
settings('site.name', 'My App');
get_setting('site.name', 'My App');

// Set a setting
set_setting('site.name', 'Acme Corp');

// Check existence
setting_exists('site.name');  // true

// Remove a setting
remove_setting('site.name');

// Get the Settings service instance
$settingsService = settings();
```

### Via facade

[](#via-facade)

```
use Centrex\Settings\Facades\Settings;

Settings::set('maintenance.enabled', true);
Settings::get('maintenance.enabled', false);
Settings::has('maintenance.enabled');
Settings::forget('maintenance.enabled');

// Force a cache refresh
Settings::refreshCache();
```

### Config integration

[](#config-integration)

Settings are merged into the Laravel config on boot via `chargeConfig()`. After that, database settings are accessible through `config()`:

```
config('site.name');  // returns the value stored in the settings table
```

### Caching

[](#caching)

- Reads use `Cache::rememberForever` per key.
- Any `set()` or `forget()` call automatically flushes the cache and reloads config.

Testing
-------

[](#testing)

```
composer test        # full suite
composer test:unit   # pest only
composer test:types  # phpstan
composer lint        # pint
```

Changelog
---------

[](#changelog)

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

Credits
-------

[](#credits)

- [centrex](https://github.com/centrex)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance75

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% 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 ~29 days

Recently: every ~75 days

Total

22

Last Release

306d ago

PHP version history (3 changes)v1.0.0PHP ^8.0|^8.1

v1.0.9PHP ^8.1|^8.2

v1.2.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b62fd49922fd1bf7d55b94cc82ebc9f359af7f343b246a7e3a2642779c0b4e7?d=identicon)[rochi88](/maintainers/rochi88)

---

Top Contributors

[![rochi88](https://avatars.githubusercontent.com/u/29769944?v=4)](https://github.com/rochi88 "rochi88 (55 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

laravellaravel-settingscentrex

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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