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

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

aescarcha/setting
=================

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

1.0.1(11y ago)098MITPHPPHP &gt;=5.3.0

Since Jun 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/aescarcha/philf-setting)[ Packagist](https://packagist.org/packages/aescarcha/setting)[ RSS](/packages/aescarcha-setting/feed)WikiDiscussions master Synced 4d ago

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

[![Build Status](https://camo.githubusercontent.com/ab78aed7603d1a42324968cb8cdcda9cb4b383bdca5ab9420346ed4cab1ce39d/68747470733a2f2f7472617669732d63692e6f72672f5068696c2d462f53657474696e672e706e67)](https://travis-ci.org/Phil-F/Setting)

Forked from `philf/setting`, it was abandoned

Laravel Setting
===============

[](#laravel-setting)

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 app\_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)

```
janhartigan (Treeface)
Nils Plaschke (Chumper)
Álvaro Escarcha

```

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

[](#installation)

Require this package in your composer.json:

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

```

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

```
'Philf\Setting\SettingServiceProvider',

```

Usage
-----

[](#usage)

\##Config

```
return array(
'path'     => app_path().'/storage/meta',
'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 49% 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 87.2% 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 ~1743 days

Total

2

Last Release

2615d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44e7a12833605bd3cf56fe9fd74b7c77044e78d1a782f49146e9e0b2d58ffc86?d=identicon)[aEscarcha](/maintainers/aEscarcha)

---

Top Contributors

[![Weztec](https://avatars.githubusercontent.com/u/113368781?v=4)](https://github.com/Weztec "Weztec (41 commits)")[![bfanger](https://avatars.githubusercontent.com/u/207248?v=4)](https://github.com/bfanger "bfanger (2 commits)")[![aescarcha](https://avatars.githubusercontent.com/u/8446899?v=4)](https://github.com/aescarcha "aescarcha (1 commits)")[![garygreen](https://avatars.githubusercontent.com/u/1702638?v=4)](https://github.com/garygreen "garygreen (1 commits)")[![heinzmuller](https://avatars.githubusercontent.com/u/1785105?v=4)](https://github.com/heinzmuller "heinzmuller (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/aescarcha-setting/health.svg)

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

###  Alternatives

[illuminatech/array-factory

Allows DI aware object creation from array definition

2159.6k6](/packages/illuminatech-array-factory)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[thetispro/laravel5-setting

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

289.7k](/packages/thetispro-laravel5-setting)[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)
