Laravel 5 configuration - environments and overriding
问题 I installed fresh Laravel 5 copy. My detectEnvironment function is defined this way: $app->detectEnvironment(function() { return 'local'; return getenv('APP_ENV') ?: 'production'; }); In config\local I've created database.php file: <?php return [ 'nothing' => 'new', ]; I run php artisan clear-compiled . My index method of WelcomeController is defined this way: public function index(Application $app) { echo $app->environment(); var_dump($app['config']['database']); //echo $app['config'][