2017 © Pedro Pelรกez
 

library cascading-config

Bringing the cascading configuration system back to Laravel 5.

image

weidacat/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  • Saturday, February 10, 2018
  • by cat_lin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Cascading Config

Build Status Dependency Status License, (*1)

A simple package that brings the cascading configuration system back into Laravel 5., (*2)

Requirements

  • Laravel 5

Features

  • Laravel-4 style cascading config (can't believe I'm writing this)
  • Nested configuration is fully supported

Installation

First, require weidacat/cascading-config into your composer.json and run composer update:, (*3)

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., (*4)

Your application structure now should have something like this:, (*5)

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,, (*6)

Usage

For Laravel

  1. Add the package's service provider class into config/app.php:, (*7)

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

    Weidacat\CascadingConfig\CascadingConfigServiceProvider::class,

    ], ```, (*9)

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 for more details on this behavior, and how to work around it., (*10)

License

MIT ยฉ Phan An, (*11)

The Versions

10/02 2018

dev-master

9999999-dev https://github.com/weidacat/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  Sources   Download

MIT

The Development Requires

by Weida Lin

laravel configuration config laravel 5 cascade cascading

16/11 2015

2.0.0

2.0.0.0 https://github.com/phanan/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  Sources   Download

MIT

The Development Requires

laravel configuration config laravel 5 cascade cascading

18/06 2015

1.0.3

1.0.3.0 https://github.com/phanan/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel configuration config laravel 5 cascade cascading

18/06 2015

1.0.2

1.0.2.0 https://github.com/phanan/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel configuration config laravel 5 cascade cascading

13/04 2015

1.0.0

1.0.0.0 https://github.com/phanan/cascading-config

Bringing the cascading configuration system back to Laravel 5.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel configuration config laravel 5 cascade cascading