PHPackages                             minkbear/setting - 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. minkbear/setting

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

minkbear/setting
================

Persistent configuration settings for Laravel - Create, Read, Update and Delete settings stored in files using JSON

1.2.0(10y ago)215MITPHPPHP &gt;=5.4.0

Since May 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/minkbear/Setting)[ Packagist](https://packagist.org/packages/minkbear/setting)[ RSS](/packages/minkbear-setting/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/96de9d96af1e03a18b3c5fd509999416205a4417472cafbe0ce57bf3da3abf7b/68747470733a2f2f7472617669732d63692e6f72672f5468652d45434d2d47726f75702f53657474696e672e737667)](https://travis-ci.org/The-ECM-Group/Setting)

Laravel Setting (Laravel 5 package)
===================================

[](#laravel-setting-laravel-5-package)

Persistent configuration settings for Laravel - Create, Read, Update and Delete settings stored in files using JSON.

This package was the result of me not being able to save new settings to config files in a more persistent way.

This package was designed not to replace the config solution currently offered by Laravel but rather complement it and be used in unison with it.

By default the data is stored in storage\_path().'/app/setting.json' but this can be easily changed either in the config file or on the fly in realtime.

This package also provides a fallback for the Laravel Config facade, you can set it in the config, if the key is not found in the json file it will look it up in the Config facade.

Contributors
------------

[](#contributors)

```
janhartigan (Treeface)
Nils Plaschke (Chumper)

```

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

[](#installation)

Require this package in your composer.json:

```
"philf/setting": "dev-master"

```

And add the ServiceProvider to the providers array in app/config/app.php

```
'minkbear\Setting\SettingServiceProvider',

```

And publish the config file

```
php artisan vendor:publish --provider="minkbear\Setting\SettingServiceProvider"

```

Usage
-----

[](#usage)

\##Config

```
return array(
'path'     => storage_path().'/app',
'filename' => 'setting.json',
'fallback' => true,
'autoAlias => true,
);

```

\##Fallback capability built in. // Automatic fallback to Laravel config Setting::get('app.locale');

\##Single dimension

```
set:        Setting::set('name', 'Phil')
get:        Setting::get('name')
forget:     Setting::forget('name')
has:        Setting::has('name')

```

\#Multi dimensional

```
set:        Setting::set('names.firstName', 'Phil')
set:        Setting::set('names.surname', 'F')
    or
set:        Setting::set('names', array('firstName' => 'Phil', 'surname' => 'F'))
setArray:   Setting::setArray(array('firstName' => 'Phil', 'surname' => 'F'))
get:        Setting::get('names.firstName')
forget:     Setting::forget('names.surname'))
has:        Setting::has('names.firstName')

```

\#Array processing // Get all of the entries in the names array $names = Setting::get('names');
foreach ($names as $key =&gt; $val) { ... }

```
    // Get the whole array
    $everything = Setting::get();

```

You can also clear the JSON file with the clear command

```
clear:      Setting::clear()

```

Using a different path (make sure the path exists and is writable) \*

```
Setting::path(app_path().'/storage/meta/sub')->set('names2', array('firstName' => 'Phil', 'surname' => 'F'));

```

Using a different filename

```
Setting::filename('setting2.json')->set('names2', array('firstName' => 'Phil', 'surname' => 'F'));

```

Using both a different path and filename (make sure the path exists and is writable)

```
Setting::path(app_path().'/storage/meta/sub')->filename('dummy.json')->set('names2', array('firstName' => 'Phil', 'surname' => 'F'));

```

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Total

2

Last Release

3986d ago

### Community

Maintainers

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

---

Top Contributors

[![Weztec](https://avatars.githubusercontent.com/u/113368781?v=4)](https://github.com/Weztec "Weztec (41 commits)")[![Daedalus11069](https://avatars.githubusercontent.com/u/1094363?v=4)](https://github.com/Daedalus11069 "Daedalus11069 (3 commits)")[![bfanger](https://avatars.githubusercontent.com/u/207248?v=4)](https://github.com/bfanger "bfanger (2 commits)")[![minkbear](https://avatars.githubusercontent.com/u/233714?v=4)](https://github.com/minkbear "minkbear (1 commits)")[![heinzmuller](https://avatars.githubusercontent.com/u/1785105?v=4)](https://github.com/heinzmuller "heinzmuller (1 commits)")[![garygreen](https://avatars.githubusercontent.com/u/1702638?v=4)](https://github.com/garygreen "garygreen (1 commits)")[![janhartigan](https://avatars.githubusercontent.com/u/580052?v=4)](https://github.com/janhartigan "janhartigan (1 commits)")

---

Tags

laravelconfig

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/minkbear-setting/health.svg)

```
[![Health](https://phpackages.com/badges/minkbear-setting/health.svg)](https://phpackages.com/packages/minkbear-setting)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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