Laravel 5 configuration - environments and overriding

前端 未结 4 846
滥情空心
滥情空心 2021-01-11 12:59

I installed fresh Laravel 5 copy.

My detectEnvironment function is defined this way:

$app->detectEnvironment(function()
{
    return \'local\';
           


        
4条回答
  •  天命终不由人
    2021-01-11 13:36

    Although in documentation for Laravel dev (5.0) there is info that configuration will cascade it's not true. I have tested it about 2 weeks ago and it seems at the moment the only way to have different values for environments is using ENV file where you put custom values for current environment. Putting settings in directories won't work as it used to work however it's possible it will change or maybe has been already changed for last 2 weeks.

提交回复
热议问题