Laravel的APP_ENV设置为production和local分别有什么不同?
Laravel的APP_ENV设置为production和local分别有什么不同?
return [
...
'env' => env('APP_ENV', 'production'),
...
];
production
生产模式下运行迁移
命令会有警告,一些运行错误会写入日志,不会直接暴露给前端。第三方调试包也不会在生产模式下开启,比如
debugerBar
。简而言之
production
就是一切都部署好,最后项目调优之后,把env
环境改为production
,local
反之。