Commit c9698df2 authored by Taylor Otwell's avatar Taylor Otwell

added support for environment driven configuration files.

parent 5a43f29f
......@@ -100,7 +100,9 @@ class Config {
*/
public static function load($file)
{
if ( ! array_key_exists($file, static::$items) and file_exists($path = APP_PATH.'config/'.$file.EXT))
$directory = (isset($_ENV['LARAVEL_ENV'])) ? $_ENV['LARAVEL_ENV'].'/' : '';
if ( ! array_key_exists($file, static::$items) and file_exists($path = APP_PATH.'config/'.$directory.$file.EXT))
{
static::$items[$file] = require $path;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment