PHPackages                             weidacat/cascading-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. weidacat/cascading-config

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

weidacat/cascading-config
=========================

Bringing the cascading configuration system back to Laravel 5.

2.0.0(10y ago)027MITPHP

Since Apr 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/weidacat/cascading-config)[ Packagist](https://packagist.org/packages/weidacat/cascading-config)[ Docs](https://github.com/phanan/cascading-config)[ RSS](/packages/weidacat-cascading-config/feed)WikiDiscussions master Synced yesterday

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

Cascading Config
================

[](#cascading-config)

[![Build Status](https://camo.githubusercontent.com/5503d5153e2b3720b23f19d07db4cf6f56d3d7bcdd6270f19e851ea4c714d8b7/68747470733a2f2f7472617669732d63692e6f72672f7068616e616e2f636173636164696e672d636f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phanan/cascading-config)[![Dependency Status](https://camo.githubusercontent.com/b84e4786c1e158454ede1502558f5f4a1f659f325c1660f3824848cf469e8020/68747470733a2f2f67656d6e617369756d2e636f6d2f7068616e616e2f636173636164696e672d636f6e6669672e737667)](https://gemnasium.com/phanan/cascading-config)[![License](https://camo.githubusercontent.com/60608b97437eb26f6f84c3fc67e5f89a2ee0d1630c35ab9fbf42aa39ead1a4b9/68747470733a2f2f706f7365722e707567782e6f72672f7068616e616e2f636173636164696e672d636f6e6669672f6c6963656e73652e737667)](https://packagist.org/packages/phanan/cascading-config)

A simple package that brings the cascading configuration system back into Laravel 5.

Requirements
------------

[](#requirements)

- Laravel 5

Features
--------

[](#features)

- Laravel-4 style cascading config (can't believe I'm writing this)
- [Nested configuration](https://github.com/laravel/framework/commit/fee982004a795058ab6a66e1600c11aac6748acf) is fully supported

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

[](#installation)

First, require `weidacat/cascading-config` into your `composer.json` and run `composer update`:

```
composer require "weidacat/cascading-config:dev-master"

```

An environment-based configuration directory should have a name with this format `config/{APP_ENV}`, and reside in the same directory as the default `config` dir. For Laravel, `php artisan vendor:publish`will create a sample directory for your `local` environment.

Your application structure now should have something like this:

```
config
├── app.php
├── auth.php
├── cache.php
├── compile.php
├── database.php
├── mail.php
└── local
    ├── app.php
    ├── auth.php
    ├── cache.php
    ├── mail.php
    └── nested
    └── app.php

```

Fill the configuration into your environment-based config directory (`config.local`, `config.staging`, `config.production`), just like what you've always done in Laravel 4,

Usage
-----

[](#usage)

### For Laravel

[](#for-laravel)

1. Add the package's service provider class into `config/app.php`:

    ```
    'providers' => [
        /*
         * ...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,

        Weidacat\CascadingConfig\CascadingConfigServiceProvider::class,
    ],
    ```

Notes
-----

[](#notes)

Because of the way `array_merge_recursive()` works, a config key with value being an indexed (non-associative) array (for instance, `app.providers`) will have the value's items overridden. See [\#6](https://github.com/phanan/cascading-config/issues/6) for more details on this behavior, and how to work around it.

License
-------

[](#license)

MIT © [Phan An](http://phanan.net)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~72 days

Total

4

Last Release

3830d ago

Major Versions

1.0.3 → 2.0.02015-11-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a0a397727126168c492f5fcd5be0b96c7a193a4affce179e9840ce48e6f022c?d=identicon)[cat\_lin](/maintainers/cat_lin)

---

Top Contributors

[![phanan](https://avatars.githubusercontent.com/u/8056274?v=4)](https://github.com/phanan "phanan (8 commits)")[![halfer](https://avatars.githubusercontent.com/u/480975?v=4)](https://github.com/halfer "halfer (2 commits)")[![albertosabena](https://avatars.githubusercontent.com/u/11071710?v=4)](https://github.com/albertosabena "albertosabena (1 commits)")

---

Tags

laravelconfigurationconfiglaravel 5cascadingcascade

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[akaunting/laravel-setting

Persistent settings package for Laravel

495805.1k7](/packages/akaunting-laravel-setting)[illuminatech/array-factory

Allows DI aware object creation from array definition

2159.6k6](/packages/illuminatech-array-factory)

PHPackages © 2026

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