laravel加载多环境配置
把.env文件清空,里面写入local,testing,production等,则可以切换对应的环境。继续优化,把这段代码移到index.php文件中,如下:$app = require_once __DIR__.'/../bootstrap/app.php';# .env配置多环境$app->detectEnvironment(function () use($app) { $envName = trim(file_get_contents($app->environment