php - How to change the environment in Laravel 5.1? -
what understand working of environments in laravel have different environments different, environments. so, if running app locally have .env.local file. if testing or on production, use .env.testing or .env.production. (correct me if wrong.)
default .env file can edit. can tell me workflow of changing environments in laravel. tried documentation couldn't it. please me.
when install laravel 5.1 2 files .env , .env.example if want work locally set :
app_env=local app_debug=true in prod set
app_env=production app_debug=false an error message in debug mode

an error message production mode

note: have 2 .env files .env , .env.example .. can create 1 name .env.production keep in mind in order configuration loaded must rename file .env
edit : in case still working in local , need database test, can create file in total have 3 .env files :
.env.production .env.local1 .env.local2 whenever want switch configuration rename desired file .env
Comments
Post a Comment