Created
January 20, 2015 19:40
-
-
Save gpassarelli/1740c829c864ef734bf7 to your computer and use it in GitHub Desktop.
Laravel Override Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get config loader | |
$loader = $this->app['config']->getLoader(); | |
// Get environment name | |
$env = $this->app['config']->getEnvironment(); | |
// Add package namespace with path set base on your requirement | |
$loader->addNamespace('basset',__DIR__.'/../config/basset'); | |
// Load package override config file | |
$configs = $loader->load($env,'config','basset'); | |
// Override value | |
$this->app['config']->set('basset::config',$configs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment