PHPackages                             laradic/config - 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. [Database &amp; ORM](/categories/database)
4. /
5. laradic/config

ActiveLibrary[Database &amp; ORM](/categories/database)

laradic/config
==============

Laravel 5 config extensions: save to file/db. use namespaces, etc

2.0.0(5y ago)01.5k1MITPHPPHP &gt;=7.1.0

Since Mar 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/laradic/config)[ Packagist](https://packagist.org/packages/laradic/config)[ Docs](https://github.com/laradic/config)[ RSS](/packages/laradic-config/feed)WikiDiscussions master Synced today

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

[![Laravel logo](https://camo.githubusercontent.com/f4160380c8933ec4e23dfb2e993b90fdef6be139c28f8b26860412911013d7a9/687474703a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f6c61726176656c2d6c6f676f2e706e67)](https://camo.githubusercontent.com/f4160380c8933ec4e23dfb2e993b90fdef6be139c28f8b26860412911013d7a9/687474703a2f2f6c61726176656c2e636f6d2f6173736574732f696d672f6c61726176656c2d6c6f676f2e706e67) Laravel 5 Config package
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================

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

[![GitHub Version](https://camo.githubusercontent.com/16e1cbd76af7dc89df9948a0742d9abf75c5789cfca96aa6dfc2241a0ce0c244/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6c6172616469632f636f6e6669672e7376673f7374796c653d666c61742d737175617265266c6162656c3d76657273696f6e)](http://badge.fury.io/gh/laradic%2Fconfig)[![Total Downloads](https://camo.githubusercontent.com/5f8fecfb9d116f1da289a9ee2ba9a9bfa615ad494e45695cb99949f94459432c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469632f636f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laradic/config)[![License](https://camo.githubusercontent.com/3950454bd41aa92a19854a4ad516b52a3f53211ab0ebc68beff94e5379a2036b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6666363962342e7376673f7374796c653d666c61742d737175617265)](http://radic.mit-license.org)

Version 1.3
-----------

[](#version-13)

### Features

[](#features)

- Namespaced config (like laravel 4: `Config::get('vendor/package::config.item')`)
- Namespaced publishing (like laravel 4: `config/packages/VENDOR/PACKAGE/config.php`)
- Or use the standard Laravel 5 way: Compatible with laravel 5 default configs. Adding the package will not invalidate your current setup.
- Persistent configuration. Save changes to a **`mirroring` `file` or `database`**.
- `Config::getLoader()->set('iam/awesome::my.config.key', 'A changed value')` saves it to a **mirroring** `file` or `db`
- Supports **PHP**, **YAML** and soon also **XML** configuration files.

---

### Overview [^](#top)

[](#overview-)

- [Features](#top)
- [Overview](#overview)
- [Installation](#installation)
- [Usage](#usage)
- [Persistent config](#persistent)
- [Todo](#todo)
- [Copyright/license](#copyright)

---

### Installation [^](#top)

[](#installation-)

###### Composer

[](#composer)

```
"laradic/config": "1.3.*"
```

###### Service provider

[](#service-provider)

```
"Laradic\Config\ConfigServiceProvider"
```

###### Bootstrapper

[](#bootstrapper)

Replace the default laravel `Illuminate\Foundation\Bootstrap\LoadConfiguration` bootstrapper with `Laradic\Config\Bootstrap\LoadConfiguration` bootstrapper inside `app/Http/Kernel.php` and `app/Console/Kernel.php`.

```
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel {
    protected $bootstrappers = [
        'Illuminate\Foundation\Bootstrap\DetectEnvironment',
        'Laradic\Config\Bootstrap\LoadConfiguration',
        'Illuminate\Foundation\Bootstrap\ConfigureLogging',
        'Illuminate\Foundation\Bootstrap\HandleExceptions',
        'Illuminate\Foundation\Bootstrap\RegisterFacades',
        'Illuminate\Foundation\Bootstrap\RegisterProviders',
        'Illuminate\Foundation\Bootstrap\BootProviders',
    ];
}
```

### Basic usage [^](#top)

[](#basic-usage-)

Inside any ServiceProvider:

```
class YourServiceProvider extends ServiceProvider
{
    use ConfigProviderTrait;

    public function register()
    {
        $this->addConfigComponent('vendorname/packagename', 'vendorname/packagename', realpath(__DIR__.'/../resources/config'));
    }
}
```

- Namespaced configuration can be accessed with `Config::get('vendorname/packagename::config.item')`.
- Publishing the config file is done with the default laravel `vendor:publish` command.

### Persistent config [^](#top)

[](#persistent-config-)

You can set persistent config items, by default the values will be saved in a seperate, mirrored file that gets merged on boot. It is also possible to save to database.

Inside the config file you can change the save method by changing the \[`loader`\] value.

```
return array(
    'loader' => 'file',
    'loaders' => array(
        'file' => array(
            'save_path' => storage_path('laradic_config')
        ),
        'db' => array(
            'table' => 'config'
        )
    ),
    //.... other options
);
```

**Important**: If you plan on using the `db` loader, you will have to run the included migration that will create the required `config` database table.

You can set persistent config values like this:

```
Config::getLoader()->set('config.item', 'value');
```

### Todo [^](#top)

[](#todo-)

- YAML/YML file support.
- Database saving
- XML file support
- Unit tests

### Copyright/License [^](#top)

[](#copyrightlicense-)

Copyright 2015 [Robin Radic](https://github.com/RobinRadic) - [MIT Licensed](http://radic.mit-license.org)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

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

Recently: every ~512 days

Total

13

Last Release

2032d ago

Major Versions

1.3.8 → 2.0.02020-12-10

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/303828383a9c2bf382436a61f4471425428b28c095c6df9a9714444cbc163538?d=identicon)[radic](/maintainers/radic)

---

Top Contributors

[![RobinRadic](https://avatars.githubusercontent.com/u/754732?v=4)](https://github.com/RobinRadic "RobinRadic (1 commits)")

---

Tags

laravelconfigdatabasedbnamespacesavenamespacespersistent

### Embed Badge

![Health badge](/badges/laradic-config/health.svg)

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

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[arcanedev/laravel-settings

This package allows you to persists configs/settings for Laravel projects.

78138.5k6](/packages/arcanedev-laravel-settings)[illuminatech/config

Provides support for Laravel application runtime configuration managed in persistent storage

15121.7k1](/packages/illuminatech-config)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

166251.3k1](/packages/cybercog-laravel-clickhouse)[laravel-doctrine/acl

ACL for Laravel and Doctrine

44476.5k7](/packages/laravel-doctrine-acl)[webparking/laravel-db-rebuild

A laravel package that allows for quick database rebuilds with presets.

448.8k](/packages/webparking-laravel-db-rebuild)

PHPackages © 2026

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