【发布时间】:2015-01-27 22:36:39
【问题描述】:
我在 Laravel 的 config 目录中有三个环境文件夹:开发、测试和本地。当我在 start.php 文件中更改环境和主机名时,只能识别生产环境。有什么想法我可能在这里做错了吗?
app/routes.php
//using this as a test to confirm that the correct environment is being used
Route::get('/', function()
{
var_dump(App::environment());
});
bootstrap/start.php:
$env = $app->detectEnvironment(array(
'development' => array('localhost'),
));
这里,结果应该是 "string(11) "development"。相反,它是 "string(10) "production"。
【问题讨论】:
标签: php laravel configuration frameworks