PHPackages                             garf/laravel-conf - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. garf/laravel-conf

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

garf/laravel-conf
=================

Store additional configs in JSON or Database (write, read)

v3.0.3(9y ago)246.4k↑592.3%4[1 issues](https://github.com/garf/laravel-conf/issues)MITPHPPHP &gt;=5.4.0

Since Aug 27Pushed 9y ago2 watchersCompare

[ Source](https://github.com/garf/laravel-conf)[ Packagist](https://packagist.org/packages/garf/laravel-conf)[ RSS](/packages/garf-laravel-conf/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Laravel Improved Config
=======================

[](#laravel-improved-config)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Laravel Version](https://camo.githubusercontent.com/8741d3fb47bc386f58a0e2f4165af56b04a3d004f94e3b358d12106fa1f25765/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d352d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)

[![Laravel Conf](conf.png)](conf.png)

[Russian Documentation / Русская документация](https://github.com/garf/laravel-conf/blob/master/README-ru.md)

Custom editable configs for Laravel 5.

Caution
-------

[](#caution)

Repository address changed from `gaaarfild` to `garf`. Dont forget to fix your `composer.json`.

This package helps you to store your additional configuration from your code in custom storage.

By default it uses JSON-file.

This is helpful when you need to edit your configuration by user from GUI. i.e. Website settings.

Caution!
--------

[](#caution-1)

Be careful! This is version 2 of the package and fallback configuration was removed.

If you still need to use it, please install [version 1.\*](https://github.com/garf/laravel-conf/tree/v1.2.2)

Install
-------

[](#install)

To install version 2, type the following command in your command line:

```
$ composer require "garf/laravel-conf:3.*"
```

Or add

```
"garf/laravel-conf": "3.*"
```

to your `composer.json` file into `require` section.

Then type in console

```
$ composer update
```

When update completed, add to your `config/app.conf` file to `providers` section

```
'providers' => [
    // ...
    Garf\LaravelConf\LaravelConfServiceProvider::class,
]
```

If you want to use `Conf` facade, add to same file at the `aliases` section

```
'aliases' => [
    // ...
  'Conf' => Garf\LaravelConf\ConfFacade::class,
]
```

### Publishing config file

[](#publishing-config-file)

To be able to change file location, please execute the following command in the console:

`php artisan vendor:publish --provider="Garf\LaravelConf\LaravelConfServiceProvider" --tag="config"`

Then you can edit file `config/laravel-conf.php` to set any path to file you want to.

Usage
-----

[](#usage)

### Get config value

[](#get-config-value)

```
Conf::get('key.to.retrieve', 'default_value');
```

Else will return default value.

Could be used 'dot' notation

### Save config value

[](#save-config-value)

```
Conf::set('key', 'value_to_save');
```

Could be used 'dot' notation

Also method `put` can be used to store multiple config values as array

```
$config = [
    'key1' => 'value1',
    'key2.subkey' => `value2`,
];
Conf::put($config);
```

### Removing key from config

[](#removing-key-from-config)

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

Could be used 'dot' notation

### Get entire config

[](#get-entire-config)

```
Conf::all();
```

### Get entire config in JSON

[](#get-entire-config-in-json)

```
Conf::toJson();
```

### Check config key existence

[](#check-config-key-existence)

```
Conf::has('key.to.check');
```

Could be used 'dot' notation

### Helper

[](#helper)

Also helper `conf()` can be used for more convenience.

Usage is similar to build in `config()` helper.

```
conf()->set('key.subkey', 'myValue');

conf('key.subkey') // will return 'myValue'

conf('non.existing.key', 'myDefaultValue') // will return 'myDefaultValue'

$config = [
    'key1' => 'value1',
    'key2.subkey' => `value2`,
];

conf($config)
```

Custom storage drivers
----------------------

[](#custom-storage-drivers)

This package uses the Laravel Manager class under the hood, so it's easy to add your own custom store driver if you want to store in some other way. All you need to do is extend the abstract `Garf\LaravelConf\Drivers\AbstractDriver` class, implement the abstract methods and call Conf::extend.

```
class MyStorageDriver extends Garf\LaravelConf\Drivers\AbstractDriver {
    // ...
}
Conf::extend('mystorage', function($app) {
    return $app->make('MyStorageDriver');
});
```

Contributions
-------------

[](#contributions)

Contributions are highly appreciated.

Send your pull requests to `master` branch.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/garf/laravel-conf/blob/master/LICENSE) for more information.

###  Health Score

35

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~40 days

Recently: every ~35 days

Total

12

Last Release

3418d ago

Major Versions

v1.2.2 → v2.0.02016-06-26

v2.0.2 → v3.0.02016-07-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/29cdfd289f56bbc3b1cc8b5cf600e271da8953dc86358adb3ae6236eb8becd69?d=identicon)[garf](/maintainers/garf)

---

Top Contributors

[![garf](https://avatars.githubusercontent.com/u/1891709?v=4)](https://github.com/garf "garf (60 commits)")

---

Tags

jsonlaravelconfig

### Embed Badge

![Health badge](/badges/garf-laravel-conf/health.svg)

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

###  Alternatives

[json-mapper/laravel-package

The JsonMapper package for Laravel

25160.6k3](/packages/json-mapper-laravel-package)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

589.9k](/packages/sbsaga-toon)

PHPackages © 2026

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