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

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

thetispro/laravel5-setting
==========================

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

1.1.x-dev(9y ago)289.7k5[1 issues](https://github.com/thetispro/laravel5-setting/issues)MITPHPPHP &gt;=5.6.0

Since Mar 4Pushed 9y ago3 watchersCompare

[ Source](https://github.com/thetispro/laravel5-setting)[ Packagist](https://packagist.org/packages/thetispro/laravel5-setting)[ Docs](https://github.com/thetispro/laravel5-setting)[ RSS](/packages/thetispro-laravel5-setting/feed)WikiDiscussions master Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/51d02a111119cbab3d3505668da7ecb24d92d58b4f92432f1d053d439399ffbb/68747470733a2f2f7472617669732d63692e6f72672f74686574697370726f2f6c61726176656c352d73657474696e672e737667)](https://travis-ci.org/thetispro/laravel5-setting)

Laravel 5 Setting
=================

[](#laravel-5-setting)

\##Introduction This package is a fork of [philf/setting](https://github.com/Phil-F/Setting), updated to work with Laravel 5.x.

\##Description Persistent configuration settings for Laravel 5.x - Create, Read, Update and Delete settings stored in files using JSON.

As Philf said :

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 base\_path().'/storage/meta/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)

For philf/setting: janhartigan (Treeface) Nils Plaschke (Chumper)

\##Laravel 4.x users Please use [philf/setting](https://github.com/Phil-F/Setting)

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

[](#installation)

Require this package in your composer.json:

#### For Laravel 5 -&gt; 5.3

[](#for-laravel-5---53)

```
"thetispro/laravel5-setting": "1.0.x-dev"

```

#### For Laravel 5.4

[](#for-laravel-54)

```
    "thetispro/laravel5-setting": "1.1.x-dev"

```

Add the ServiceProvider to the 'providers' array in config/app.php

```
'providers' => [
// ... Illuminate Providers
// ... App
Thetispro\Setting\SettingServiceProvider::class,
],

```

If you want to use the facade, add the alias to the 'aliases' array in config/app.php

```
'aliases' => [
// ... Illuminate Facades
'Setting' => Thetispro\Setting\Facades\Setting::class,
]

```

Finaly, publish the config file

```
$ php artisan vendor:publish

```

Usage
-----

[](#usage)

```
No other change from philf/setting;

```

\##Config

```
return array(
'path'     => base_path('storage/meta'),
'filename' => 'setting.json',
'fallback' => 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 5 Setting is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

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

Every ~0 days

Total

2

Last Release

3362d ago

PHP version history (2 changes)1.1.x-devPHP &gt;=5.6.0

1.0.x-devPHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/62f812ad2195016232b0ba1f6c4b967f195d3de8228d218edbb590a3ce88f86d?d=identicon)[thetispro](/maintainers/thetispro)

---

Top Contributors

[![thetispro](https://avatars.githubusercontent.com/u/3465383?v=4)](https://github.com/thetispro "thetispro (11 commits)")

---

Tags

laravelconfigsetting

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminatech/array-factory

Allows DI aware object creation from array definition

2159.6k6](/packages/illuminatech-array-factory)[seanstewart/plan-config

Plan config allows you to easily define attributes and limits for your SaaS application subscription plans.

314.0k](/packages/seanstewart-plan-config)

PHPackages © 2026

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