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

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

tungltdev/laravel-settings
==========================

Laravel 5 Persistent Settings

0.0.1(6y ago)0612MITPHPPHP &gt;=5.6

Since Sep 4Pushed 6y agoCompare

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

READMEChangelogDependencies (3)Versions (2)Used By (0)

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

[](#laravel-settings)

Laravel ^5.7.x Persistent Settings (Database + Cache)

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

[](#how-to-install)

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

```
composer require tungltdev/laravel-settings

```

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="Tungltdev\LaravelSettings\SettingsServiceProvider"

```

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');
or
settingset('key', 'value');

```

Get a value

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

```

Get a value with Default Value.

```
$value = Settings::get('key', 'Default Value');
or
$value = settings('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
--------------------------

[](#fallback-to-laravel-config)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

2444d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c53592e19db478ad1808cd8f7816bb52941eda1026a6d9f5ebeedba13bd6351b?d=identicon)[tungltdev](/maintainers/tungltdev)

---

Top Contributors

[![lethanhtung97](https://avatars.githubusercontent.com/u/42159471?v=4)](https://github.com/lethanhtung97 "lethanhtung97 (2 commits)")[![tungltdev](https://avatars.githubusercontent.com/u/31556693?v=4)](https://github.com/tungltdev "tungltdev (2 commits)")

---

Tags

laravelSettingspersistent

### Embed Badge

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

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

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

Laravel 5 Persistent Settings

6039.6k1](/packages/efriandika-laravel-settings)[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)
