laravel/framework — pull request #171 by marcingrabda (2013-01-26 19:05:24+00:00)
Title: default environment as second parameter of detectEnvironment method

Hi,

I have noticed that Laravel no longer detects environment based on url and also stopped using LARAVEL_ENV. Now, environment detection is based only on host name. In that situation, can we have a second parameter in detectEnvironment method, which defines default environment?

public function detectEnvironment($environments, $default = 'production')
{
(...)
return $default;
}

In my opinion, and many people will agree, many won't, it is risky to treat the default configuration files as production, because especially with tools like migrations, one runs the risk of corrupting this environment. I would prefer to have local as my default. This solution gives people choice.

Thanks,
Marcin