PHPackages                             ryangjchandler/laravel-json-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. [File &amp; Storage](/categories/file-storage)
4. /
5. ryangjchandler/laravel-json-settings

ActiveLibrary[File &amp; Storage](/categories/file-storage)

ryangjchandler/laravel-json-settings
====================================

Store your Laravel application settings in an on-disk JSON file.

v0.1.0(4y ago)318681[3 PRs](https://github.com/ryangjchandler/laravel-json-settings/pulls)MITPHPPHP ^8.0

Since Feb 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ryangjchandler/laravel-json-settings)[ Packagist](https://packagist.org/packages/ryangjchandler/laravel-json-settings)[ Docs](https://github.com/ryangjchandler/laravel-json-settings)[ GitHub Sponsors](https://github.com/ryangjchandler)[ RSS](/packages/ryangjchandler-laravel-json-settings/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (12)Versions (5)Used By (0)

Store your Laravel application settings in an on-disk JSON file.
================================================================

[](#store-your-laravel-application-settings-in-an-on-disk-json-file)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b0f917b61d783903f27855051ec866bcadc90fb9f5cdd3f3c56a42de7fe920b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7279616e676a6368616e646c65722f6c61726176656c2d6a736f6e2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/laravel-json-settings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d063c844d9f70ee5b0a173eb67c2fb290f74af3d42bc38bfaea09394ecfb6c3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f6c61726176656c2d6a736f6e2d73657474696e67732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ryangjchandler/laravel-json-settings/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/08c3c7d3638dea503d6bfaf7b4058fef2a0be85218758aa189e963fb93fcfd0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7279616e676a6368616e646c65722f6c61726176656c2d6a736f6e2d73657474696e67732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/ryangjchandler/laravel-json-settings/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a573b0407f21ed482bb34f524121da6068a770bfd081272eec1f8d8113ddea06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7279616e676a6368616e646c65722f6c61726176656c2d6a736f6e2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ryangjchandler/laravel-json-settings)

This package provides a simple `SettingsRepository` class that can be used to store your application's settings in a single JSON file.

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

[](#installation)

You can install the package via composer:

```
composer require ryangjchandler/laravel-json-settings
```

You can publish the config file with:

```
php artisan vendor:publish --tag="json-settings-config"
```

Usage
-----

[](#usage)

You can resolve an instance of `RyanChandler\LaravelJsonSettings\SettingsRepository` from the container by type-hinting it in any DI-supported method, e.g. a controller method.

```
class IndexController
{
    public function __invoke(SettingsRepository $settings)
    {
        return view('index', [
            'title' => $settings->get('index.title'),
        ]);
    }
}
```

The `SettingsRepository` class contains the following methods:

- `get(string $key, mixed $default = null)` - retrieve the value of a setting by providing the key (dot-notation supported).
- `set(string $key, mixed $value, bool $save = true)` - set the value of a setting and toggle auto-save.
- `has(string $key)` - determine if a setting exists.
- `save()` - manually save your settings back to disk.
- `reload()` - clear the cache and reload the settings from disk.

If you prefer to use facades, you can interact with the `RyanChandler\LaravelJsonSettings\Facades\Settings` facade directly too.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ryan Chandler](https://github.com/ryangjchandler)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

1548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/568d485d441c691b0358b9091254a6a671fef8f76b73f28af1180ad568d142b2?d=identicon)[ryangjchandler](/maintainers/ryangjchandler)

---

Top Contributors

[![ryangjchandler](https://avatars.githubusercontent.com/u/41837763?v=4)](https://github.com/ryangjchandler "ryangjchandler (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![malohtie](https://avatars.githubusercontent.com/u/20033279?v=4)](https://github.com/malohtie "malohtie (1 commits)")

---

Tags

laravelryangjchandlerlaravel-json-settings

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[spatie/livewire-filepond

Upload files using Filepond in Livewire components

306452.7k3](/packages/spatie-livewire-filepond)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[ryangjchandler/blade-capture-directive

Create inline partials in your Blade templates with ease.

8222.2M12](/packages/ryangjchandler-blade-capture-directive)[elegantly/laravel-invoices

Store invoices safely in your Laravel application

23131.8k](/packages/elegantly-laravel-invoices)[ryangjchandler/blade-cache-directive

Cache chunks of your Blade markup with ease.

202200.8k2](/packages/ryangjchandler-blade-cache-directive)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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