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

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

dalholm/laravel-settings
========================

Database settings package for Laravel

v0.9(10mo ago)0648—0%MITPHPPHP ^8.3

Since Sep 25Pushed 10mo ago2 watchersCompare

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

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

Laravel database settings package
=================================

[](#laravel-database-settings-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/005b9e78fc36300a634859fa8c300a33ba6f388b8c36fb12ba98d34f8a38c8cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616c686f6c6d2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dalholm/laravel-settings)[![Total Downloads](https://camo.githubusercontent.com/ec35af4f9ec71123f0daba78209dd3aad2836550c666a59efd2bb30cbee2e1c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616c686f6c6d2f6c61726176656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dalholm/laravel-settings)

Simple and powerful settings package for laravel with fallback and cache option.

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

[](#installation)

You can install the package via composer:

```
composer require dalholm/laravel-settings
```

Publish
-------

[](#publish)

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

Config
------

[](#config)

```
/*
 * You can place your custom package configuration in here.
 */
return [

    /*
    |--------------------------------------------------------------------------
    | Cache
    |--------------------------------------------------------------------------
    | Cache is only working with redis and uses cache tags
    |
    */

    'cache' => [
        'enabled' => env('SETTINGS_CACHE_ENABLED', false),
        'profile' => Dalholm\LaravelSettings\Cache\CacheProfile::class,
        'store' => null,
    ],

    /*
    |--------------------------------------------------------------------------
    | Database settings
    |--------------------------------------------------------------------------
    | You could use what ever you want
    |
    */
    'database' => [
        'connection'    => null,
        'table'         => 'settings',
        'key'           => 'key',
        'value'         => 'value',
    ],

    /*
    |--------------------------------------------------------------------------
    | Fallback
    |--------------------------------------------------------------------------
    | Use this as a fallback if settings is not yet available in database
    |
    | Example:
    |       "power" => "is-on"
    |
    */

    'fallback' => [
        //
    ],

];
```

Usage
-----

[](#usage)

```
// Create / update setting or settings
// Settings will automatically update database and replace cache
settings(['key' => 'value']);

// Create / update multple
settings([
   'key 1' => 'value 1',
   'key 2' => 'value 2',
   'key 3' => 'value 3',
   // etc
]);

// Get
settings('key');
```

### Changelog

[](#changelog)

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

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)

- [Mikael Dalholm](https://github.com/dalholm)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance54

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~172 days

Recently: every ~110 days

Total

9

Last Release

312d ago

PHP version history (3 changes)v0.1PHP ^8.0

v0.4PHP ^8.1

v0.5PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/160ab22ca66cd74ef3ef3b02487955617af6aa5bd8c16ab41b1dafafd6d866d5?d=identicon)[dalholm](/maintainers/dalholm)

---

Top Contributors

[![dalholm](https://avatars.githubusercontent.com/u/426083?v=4)](https://github.com/dalholm "dalholm (8 commits)")[![4ice](https://avatars.githubusercontent.com/u/6935261?v=4)](https://github.com/4ice "4ice (6 commits)")

---

Tags

laravelSettingsconfigfallbacklaravel-settingslaravel settings packagelaravel database config

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

71510.9M66](/packages/laravel-mcp)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

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