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

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

efriandika/laravel-settings
===========================

Laravel 5 Persistent Settings

v1.2.5(9y ago)6039.6k27[9 issues](https://github.com/efriandika/laravel-settings/issues)1MITPHPPHP &gt;=5.5.9

Since Apr 13Pushed 5y ago3 watchersCompare

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

READMEChangelog (9)Dependencies (4)Versions (11)Used By (1)

[![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="Efriandika\LaravelSettings\SettingsServiceProvider" --force

```

And run

```
$ php artisan migrate

```

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

[](#how-to-install)

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

```
composer require efriandika/laravel-settings

```

or modify your `composer.json`:

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

```

then run `composer update`:

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

```
'Efriandika\LaravelSettings\SettingsServiceProvider',

```

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

```
'Settings'  => Efriandika\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="Efriandika\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

38

—

LowBetter than 85% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~81 days

Recently: every ~101 days

Total

9

Last Release

3394d 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/8664ea44ddd9bcea9c118f4c65fd69aaf7b43d316296a131cc6e4411f486c337?d=identicon)[efriandika](/maintainers/efriandika)

---

Top Contributors

[![efriandika](https://avatars.githubusercontent.com/u/6255825?v=4)](https://github.com/efriandika "efriandika (32 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/efriandika-laravel-settings/health.svg)

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

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

Persistent settings package for Laravel framework.

22483.1k1](/packages/edvinaskrucas-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)
