PHPackages                             orchestra/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. orchestra/config

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

orchestra/config
================

Configuration Component for Laravel and Orchestra Platform

v6.0.0(5y ago)79.1k12MITPHPPHP ^7.3 || ^8.0

Since Feb 10Pushed 5y ago2 watchersCompare

[ Source](https://github.com/orchestral/config)[ Packagist](https://packagist.org/packages/orchestra/config)[ RSS](/packages/orchestra-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (72)Used By (2)

Configuration Component for Laravel and Orchestra Platform
==========================================================

[](#configuration-component-for-laravel-and-orchestra-platform)

Config Component is a configuration with environment based support for Laravel 5 and above. The component is actually based from Laravel 4 configuration.

[![Latest Stable Version](https://camo.githubusercontent.com/d0067e11501f4a80351cf66df2b841ce6af5d30e61432f25ad69ced15d6c3d18/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f636f6e6669672f76657273696f6e)](https://packagist.org/packages/orchestra/config)[![Total Downloads](https://camo.githubusercontent.com/50cabda71f687d0de2abae5e23d2b67ba1bde9c74a77ddd05937d5fc0a192dd2/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f636f6e6669672f646f776e6c6f616473)](https://packagist.org/packages/orchestra/config)[![Latest Unstable Version](https://camo.githubusercontent.com/919ba1064da72fab62482ffa4d18d814ed4b78a90a69faa327752bf402b178b2/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f636f6e6669672f762f756e737461626c65)](//packagist.org/packages/orchestra/config)[![License](https://camo.githubusercontent.com/5153c7d71d7efcda13181d7f80a0da5d9024af9f0043c3f9dbe0e46b7c20b013/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f636f6e6669672f6c6963656e7365)](https://packagist.org/packages/orchestra/config)

Table of Content
----------------

[](#table-of-content)

- [Version Compatibility](#version-compatibility)
- [Installation](#installation)
- [Configuration](#configuration)

Version Compatibility
---------------------

[](#version-compatibility)

LaravelConfig5.5.x3.5.x5.6.x.3.6.x5.7.x.3.7.x5.8.x3.8.x6.x4.x7.x5.xInstallation
------------

[](#installation)

To install through composer, run the following command from terminal:

```
composer require "orchestra/config"

```

Configuration
-------------

[](#configuration)

To swap Laravel 5 default configuration, all you need to do is add the following code to `bootstrap/app.php`:

```
$app->singleton(
    Illuminate\Foundation\Bootstrap\LoadConfiguration::class,
    Orchestra\Config\Bootstrap\LoadConfiguration::class
);
```

### Configuration Caching Support

[](#configuration-caching-support)

Config Component also bring an enhanced `php artisan config:cache` support to speed up configuration loading, some features include:

- Caching packages/namespaced config instead of just application `config` directory.
- Enforcing lazy loaded packages config by including list of packages config key in `compile.config`.

In order to do this you need to replace `Illuminate\Foundation\Provider\ArtisanServiceProvider` with a new `App\Providers\ArtisanServiceProvider`:

```
