Is it a must to set environment variables in Laravel 5?
On a droplet, I have created two Linux user accounts and setup Laravel 5 for each of them at the following paths:
- User account 1 >> Maps to dev.example.com.conf virtualhost>> Maps to dev.example.com, with Laravel installed at /home/devuser/public_html
- User account 2 >> Maps to beta.example.com.conf virtualhost>> Maps to beta.example.com, with Laravel installed at /home/betauser/public_html
I installed Laravel through composer and at the root of each Laravel install, I notice a .env file, which has the Laravel API key automatically written to it. But, that file also has a whole bunch of other variables, including the following:
The default Laravel page loads when I try https://dev.example.com and https://beta.example.com (installed LetsEncrypt and redirected all requests to https), but I am a bit confused if it's also necessary to specify the details in the respective .env files as below:
and, also specify the respective db details.
Thanks in advance.