By cloudnine
On a droplet, I have created two Linux user accounts and setup Laravel 5 for each of them at the following paths:
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:
APP_ENV=local
APP_DEBUG=true
APP_KEY=Key(obfuscated)
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
etc.
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:
APP_ENV=dev
APP_DEBUG=true
APP_KEY=Key(obfuscated)
APP_URL=https://dev.example.com
and, also specify the respective db details.
Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Yes, you will want to fill out the .env file with your settings as Laravel automatically loads all the settings in that file, stores them in $_ENV and supplies them to the env() helper function that is used across all the codebase.
Check out the official documentation for more details:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.