Becouse我在我的筆記本和我的destkop上開發,我也想使用一個sql server,我可以隨時連接。如何使用不同的數據庫開發生產
我想在開發環境中連接到這個環境,並在生產環境中使用其他環境。我怎樣才能做到這一點?
我在config/database
嘗試這樣:
if('env' == 'development'){
$host = 'mysqlserver.alias.com';
$database = 'mydb';
$username = 'myuname';
$password = 'mypwd';
} else {
$host = whatsintheenv;
$database = whatsintheenv;
$username = whatsintheenv;
$password = whatsintheenv;
}
'if(App :: environment('local')){...}' –