PHPackages                             arthurydalgo/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. [Database &amp; ORM](/categories/database)
4. /
5. arthurydalgo/laravel-settings

ActiveLibrary[Database &amp; ORM](/categories/database)

arthurydalgo/laravel-settings
=============================

Store key value pair in database as settings

1.1(4y ago)0588↓50%1MITPHPPHP ^7.3|^8.0

Since Oct 9Pushed 4y agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (15)Used By (1)

Laravel Settings
----------------

[](#laravel-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f282e3c772138f562fddfb6ebd13f76f036494d7a05986ddc4ee85168c895b9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f71636f642f6c61726176656c2d73657474696e67732e737667)](https://packagist.org/packages/qcod/laravel-settings)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e3aa9296afaa914d8bbcaacb0cbce62ebd8dc351b3ac326d4a6a6643f8b59c6f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f71636f642f6c61726176656c2d73657474696e67732f6d61737465722e737667)](https://travis-ci.org/qcod/laravel-settings)[![StyleCI](https://camo.githubusercontent.com/7ec68caf1a62933861f6800521b086fac2f0d0b9740eab1cd1d2db169e62044c/68747470733a2f2f7374796c6563692e696f2f7265706f732f3135323235383034342f736869656c64)](https://styleci.io/repos/152258044)[![Total Downloads](https://camo.githubusercontent.com/6bb2a8bc4689013d9f687cffa2079b2e18503e7762f292abee1793a05cd1ac7f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f71636f642f6c61726176656c2d73657474696e67732e737667)](https://packagist.org/packages/qcod/laravel-settings)

Use `qcod/laravel-settings` to store key value pair settings in the database.

> All the settings saved in db is cached to improve performance by reducing sql query to zero.

### Installation

[](#installation)

**1** - You can install the package via composer:

```
$ composer require qcod/laravel-settings
```

**2** - If you are installing on Laravel 5.4 or lower you will be needed to manually register Service Provider by adding it in `config/app.php` providers array and Facade in aliases arrays.

```
'providers' => [
    //...
    QCod\Settings\SettingsServiceProvider::class
]

'aliases' => [
    //...
    "Settings" => QCod\Settings\Facade::class
]
```

In Laravel 5.5 or above the service provider automatically get registered and a facade `Setting::get('app_name')` will be available.

**3** - Now run the migration by `php artisan migrate` to create the settings table.

Optionally you can publish migration by running

```
php artisan vendor:publish --provider="QCod\Settings\SettingsServiceProvider" --tag="migrations"

```

### Getting Started

[](#getting-started)

You can use helper function `settings('app_name')` or `Settings::get('app_name')` to use laravel settings.

### Available methods

[](#available-methods)

```
// Pass `true` to ignore cached settings
settings()->all($fresh = false);

// Get a single setting
settings()->get($key, $defautl = null);

// Set a single setting
settings()->set($key, $value);

// Set a multiple settings
settings()->set([
   'app_name' => 'QCode',
   'app_email' => 'info@email.com',
   'app_type' => 'SaaS'
]);

// check for setting key
settings()->has($key);

// remove a setting
settings()->remove($key);
```

### Groups

[](#groups)

From `v 1.0.6` You can organize your settings into groups. If you skip the group name it will store settings with `default` group name.

> If you are updating from previous version dont forget to run the migration

You have all above methods available just set you working group by calling `->group('group_name')` method and chain on:

```
settings()->group('team.1')->set('app_name', 'My Team App');
settings()->group('team.1')->get('app_name');
> My Team App

settings()->group('team.2')->set('app_name', 'My Team 2 App');
settings()->group('team.2')->get('app_name');
> My Team 2 App

// You can use facade
\Settings::group('team.1')->get('app_name')
> My Team App
```

### Changelog

[](#changelog)

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

### Testing

[](#testing)

The package contains some integration/smoke tests, set up with Orchestra. The tests can be run via phpunit.

```
$ composer test
```

### Contributing

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

### Credits

[](#credits)

- [Mohd Saqueib Ansari](https://github.com/saqueib)

### About QCode.in

[](#about-qcodein)

QCode.in () is blog by [Saqueib](https://github.com/saqueib) which covers All about Full Stack Web Development.

### License

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 89.7% 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 ~118 days

Recently: every ~221 days

Total

11

Last Release

1590d ago

PHP version history (4 changes)1.0.0PHP &gt;=5.6.0

1.0.7PHP ^7.2

1.0.9PHP ^7.3

1.1PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/293828dcf9a77a46773240833216ac450a33aa638567381d5fc60fd7b4ace155?d=identicon)[ArthurYdalgo](/maintainers/ArthurYdalgo)

---

Top Contributors

[![saqueib](https://avatars.githubusercontent.com/u/6937224?v=4)](https://github.com/saqueib "saqueib (26 commits)")[![ArthurYdalgo](https://avatars.githubusercontent.com/u/25585428?v=4)](https://github.com/ArthurYdalgo "ArthurYdalgo (2 commits)")[![mainadennis](https://avatars.githubusercontent.com/u/50301571?v=4)](https://github.com/mainadennis "mainadennis (1 commits)")

---

Tags

laraveleloquentqcoddatabase settingsdb settings

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[qcod/laravel-app-settings

A package with UI to store and manage all the settings for your application

34197.3k](/packages/qcod-laravel-app-settings)[qcod/laravel-settings

Store key value pair in database as settings

230196.6k3](/packages/qcod-laravel-settings)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[bavix/laravel-clickhouse

Eloquent model for ClickHouse

72214.1k2](/packages/bavix-laravel-clickhouse)[stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

2928.9k7](/packages/stayallive-laravel-eloquent-observable)

PHPackages © 2026

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