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

ActiveLibrary

dkvhin/laravel-settings
=======================

Laravel 5 Persistent Settings

v1.2.7(7y ago)015MITPHPPHP &gt;=5.5.9

Since Apr 13Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Seirim/laravel-settings)[ Packagist](https://packagist.org/packages/dkvhin/laravel-settings)[ RSS](/packages/dkvhin-laravel-settings/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (13)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/dbb5f773f6cc33965650e5f42823c84cf2b6eac3c93b7f985ac3c18a80197ca2/68747470733a2f2f706f7365722e707567782e6f72672f65667269616e64696b612f6c61726176656c2d73657474696e67732f762f737461626c652e737667)](https://packagist.org/packages/efriandika/laravel-settings)[![Total Downloads](https://camo.githubusercontent.com/3af0e2b3a895c20d86b5ac6f29970af9e473ef738024d08481239011bb0b812b/68747470733a2f2f706f7365722e707567782e6f72672f65667269616e64696b612f6c61726176656c2d73657474696e67732f646f776e6c6f6164732e737667)](https://packagist.org/packages/efriandika/laravel-settings)[![Latest Unstable Version](https://camo.githubusercontent.com/f69c89737a6e9bbbfb10211a797bd9e8dd21096456c7e0b6fcb59f38cd545c7f/68747470733a2f2f706f7365722e707567782e6f72672f65667269616e64696b612f6c61726176656c2d73657474696e67732f762f756e737461626c652e737667)](https://packagist.org/packages/efriandika/laravel-settings)[![License](https://camo.githubusercontent.com/d07bb60edf0eb5eb80f926dc880b2f14f4029017707b69c0eacf3c8f4870b3b0/68747470733a2f2f706f7365722e707567782e6f72672f65667269616e64696b612f6c61726176656c2d73657474696e67732f6c6963656e73652e737667)](https://packagist.org/packages/efriandika/laravel-settings)

Laravel-Settings
================

[](#laravel-settings)

Laravel 5.1.x Persistent Settings (Database + Cache)

### Attention: for update to v1.2.0

[](#attention-for-update-to-v120)

Re-Publish new migration file

```
$ php artisan vendor:publish --provider="Dkvhin\LaravelSettings\SettingsServiceProvider" --force

```

And run

```
$ php artisan migrate

```

How to Install
--------------

[](#how-to-install)

Require this package with composer ([Packagist](https://packagist.org/packages/dkvhin/laravel-settings)) using the following command:

```
composer require dkvhin/laravel-settings

```

or modify your `composer.json`:

```
   "require": {
      "dkvhin/laravel-settings": "1.*"
   }

```

then run `composer update`:

After updating composer, Register the ServiceProvider to the `providers` array in `config/app.php`

```
'Dkvhin\LaravelSettings\SettingsServiceProvider',

```

Add an alias for the facade to `aliases` array in your `config/app.php`

```
'Settings'  => Dkvhin\LaravelSettings\Facades\Settings::class,

```

Publish the config and migration files now (Attention: This command will not work if you don't follow previous instruction):

```
$ php artisan vendor:publish --provider="Dkvhin\LaravelSettings\SettingsServiceProvider" --force

```

Change `config/settings.php` according to your needs. If you change `db_table`, don't forget to change the table's name in the migration file as well.

Create the `settings` table.

```
$ php artisan migrate

```

How to Use it?
--------------

[](#how-to-use-it)

Set a value

```
Settings::set('key', 'value');

```

Get a value

```
$value = Settings::get('key');

```

Get a value with Default Value.

```
$value = Settings::get('key', 'Default Value');

```

> Note: If key is not found (null) in cache or settings table, it will return default value

Get a value via an helper

```
$value = settings('key');
$value = settings('key', 'default value');

```

Forget a value

```
Settings::forget('key');

```

Forget all values

```
Settings::flush();

```

Fallback to Laravel Config (available in v1.2.0)
------------------------------------------------

[](#fallback-to-laravel-config-available-in-v120)

How to activate?

```
// Change your config/settings.php
'fallback'   => true

```

Example

```
/*
 * If the value with key => mail.host is not found in cache or DB of Larave Settings
 * it will return same value as config::get('mail.host');
 */
Settings::get('mail.host');

```

> Note: It will work if default value in laravel setting is not set

### Changelogs

[](#changelogs)

v1.2.0 - Dec 16th, 2015

- Bugs fix
- Adding Feature: Fallback Value

### To Do

[](#to-do)

-

### License

[](#license)

The Laravel 5 Persistent Settings is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 77.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 ~121 days

Recently: every ~238 days

Total

11

Last Release

2827d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4.0

v1.1.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ecdf60c6531a6093808b3ac4d44b551814688498fd9586ed6c8d9e73972122c?d=identicon)[dkvhin](/maintainers/dkvhin)

---

Top Contributors

[![efriandika](https://avatars.githubusercontent.com/u/6255825?v=4)](https://github.com/efriandika "efriandika (31 commits)")[![dkvhin](https://avatars.githubusercontent.com/u/7764035?v=4)](https://github.com/dkvhin "dkvhin (5 commits)")[![beeglebug](https://avatars.githubusercontent.com/u/954416?v=4)](https://github.com/beeglebug "beeglebug (2 commits)")[![brucewu16899](https://avatars.githubusercontent.com/u/5397576?v=4)](https://github.com/brucewu16899 "brucewu16899 (1 commits)")[![danieldemon](https://avatars.githubusercontent.com/u/6768782?v=4)](https://github.com/danieldemon "danieldemon (1 commits)")

---

Tags

laravelSettingspersistent

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

495805.1k7](/packages/akaunting-laravel-setting)[unisharp/laravel-settings

Persistent settings manager for laravel, translations are supported.

107169.9k2](/packages/unisharp-laravel-settings)[efriandika/laravel-settings

Laravel 5 Persistent Settings

6039.6k1](/packages/efriandika-laravel-settings)[illuminatech/config

Provides support for Laravel application runtime configuration managed in persistent storage

14921.0k1](/packages/illuminatech-config)[outerweb/settings

Application wide settings stored in your database

4899.2k5](/packages/outerweb-settings)[oriceon/laravel-settings

Laravel 5 persistent settings

207.1k1](/packages/oriceon-laravel-settings)

PHPackages © 2026

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