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

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

ferri/laravel-settings
======================

Laravel 5 persistent settings in database package

v1.0.0(9y ago)449[1 issues](https://github.com/ghprod/laravel-settings/issues)MITPHPPHP &gt;=5.6.4

Since Sep 10Pushed 9y ago4 watchersCompare

[ Source](https://github.com/ghprod/laravel-settings)[ Packagist](https://packagist.org/packages/ferri/laravel-settings)[ RSS](/packages/ferri-laravel-settings/feed)WikiDiscussions master Synced 3w ago

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

Laravel Settings
================

[](#laravel-settings)

[![Build Status](https://camo.githubusercontent.com/25a46e728d96580aaffa8c2f6738bab3eb7dbe4156e1d25dddf24b0bf5b7606f/68747470733a2f2f7472617669732d63692e6f72672f676870726f642f6c61726176656c2d73657474696e67732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ghprod/laravel-settings)[![StyleCI](https://camo.githubusercontent.com/42e6efa14dcfa226c6653bbeaeed18d7cfd142a613e7f88bbea5a72cd60056ed/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373832303531392f736869656c64)](https://styleci.io/repos/67820519)[![Total Downloads](https://camo.githubusercontent.com/35c0b8e916ebff8481f45a86d15ef9579231a47547f62ce5035816f0158f5e61/68747470733a2f2f706f7365722e707567782e6f72672f66657272692f6c61726176656c2d73657474696e67732f642f746f74616c2e737667)](https://packagist.org/packages/ferri/laravel-settings)[![License](https://camo.githubusercontent.com/6190d4efdff1dc353509266eb187eb63094f538beaa8e918040e38e1e5d66780/68747470733a2f2f706f7365722e707567782e6f72672f66657272692f6c61726176656c2d73657474696e67732f6c6963656e73652e737667)](https://packagist.org/packages/ferri/laravel-settings)

Laravel 5 persistent settings in database package

Support Laravel 5.1, 5.2, 5.3

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

[](#installation)

```
composer require ferri/laravel-settings

```

And add service provider to you `config/app.php`

```
...

Ferri\LaravelSettings\ServiceProvider::class,

...

```

Publish config and migration

```
php artisan vendor:publish --provider="Ferri\LaravelSettings\ServiceProvider" --tag=config
php artisan vendor:publish --provider="Ferri\LaravelSettings\ServiceProvider" --tag=migrations

```

Cache
-----

[](#cache)

You can disable cache when get setting value. Default is `true`. Cache is inherit from active driver in `config/cache.php`

```
'cache' => false,
```

Usage
-----

[](#usage)

### Set value

[](#set-value)

Set setting value

```
Settings::set('key', 'value');
Settings::set('keyArray', ['arrayKey' => 'arrayValue']);
```

### Get value

[](#get-value)

Get setting value

```
Settings::get('key'); // value
Settings::get('keyArray'); // ['arrayKey' => 'arrayValue']
Settings::get('keyNotExists', 'default'); // default
```

### Check value

[](#check-value)

Determine if setting exists.

```
Settings::has('key'); // true
Settings::has('keyNotExists'); // false
```

### Forget value

[](#forget-value)

Remove setting from database and cache if enabled

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

### Flush settings

[](#flush-settings)

Remove all setting from database (truncate) and cache if enabled

```
Settings::truncate();
```

### Set Extra Columns

[](#set-extra-columns)

Sometime you want to specify some criteria for each your setting. This columns will be added to each query. Extra columns always resetted after call of one these methods `set`, `get`, `has`, `forget`.

```
Settings::setExtraColumns(['tenant_id' => 1])->set('site_title', 'Awesome Blog');
Settings::setExtraColumns(['tenant_id' => 1])->get('site_title'); // Awesome Blog
Settings::setExtraColumns(['tenant_id' => 2])->get('site_title'); // null
```

Helpers
-------

[](#helpers)

### Settings Instance

[](#settings-instance)

Resolve settings service instance.

```
settings();
```

### Set value

[](#set-value-1)

Set setting value

```
settings([$key => $value]);
```

Set setting value with extra columns

```
settings([$key => $value], null, ['tenant_id' => 1])
```

### Get value

[](#get-value-1)

Get setting value

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

Get setting value with extra columns

```
settings($key, $default, ['tenant_id' => 1])
```

Testing
-------

[](#testing)

```

composer install
vendor/bin/phpunit

```

Inspiration
-----------

[](#inspiration)

This package was inspired by these great packages

-
-
-

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3579d ago

### Community

Maintainers

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

---

Top Contributors

[![fer-ri](https://avatars.githubusercontent.com/u/1922652?v=4)](https://github.com/fer-ri "fer-ri (6 commits)")

---

Tags

laravelSettingsdatabasepersistent

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[itpathsolutions/dbstan

Database Standardization and Analysis Tool for Laravel

442.1k](/packages/itpathsolutions-dbstan)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3159.7k2](/packages/toponepercent-baum)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3628.3k](/packages/orptech-laravel-migration-partition)

PHPackages © 2026

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