Reputation: 907
I am new to using heroku with laravel.
I made the deployment successfully, guided by http://goo.gl/cxiljl. But, I don't know how to modify the file .env
in heroku, to establish data connection to the database.
Upvotes: 3
Views: 6528
Reputation: 14747
Let's say that this is your local .env file:
[email protected]
URL=example.com
Heroku has a config:set
command to set a pair key-value
at config file:
$heroku config:set [email protected]
Adding config vars and restarting myapp... done, v12
EMAIL: [email protected]
To show current config values just type heroku config
:
$heroku config
EMAIL: [email protected]
Finally when you are done setting all var, just move them into the .env
file one by one:
$heroku config:get EMAIL -s >> .env
You can read more about Heroku's commands in the following articles:
Upvotes: 6