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.5.0(2mo ago)03.1k[3 PRs](https://github.com/centrex/laravel-settings/pulls)MITPHPPHP ^8.3CI passing

Since Nov 19Pushed 1w 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 3d ago

READMEChangelogDependencies (28)Versions (32)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

52

—

FairBetter than 96% of packages

Maintenance93

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 86.5% 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 ~39 days

Recently: every ~73 days

Total

24

Last Release

60d ago

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

v1.0.9PHP ^8.1|^8.2

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

v1.4.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29769944?v=4)[Raisul Islam](/maintainers/rochi88)[@rochi88](https://github.com/rochi88)

---

Top Contributors

[![rochi88](https://avatars.githubusercontent.com/u/29769944?v=4)](https://github.com/rochi88 "rochi88 (64 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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