Just as above ommentor sais.
.env files are ignored by git be default and is not uploaded to git. This is so that your passwords and other things you want to keep secret stay a secret.
You should create a new .env file on your server and populate it with all the settings and parameters you want to be used on your server. This is only needed to be done once since it won't be over-written by your local files on your next push. Nify, huh?
Yes, my .gitignore file ignores all .env files.
However, I have created a new .env file on the webserver with required details and it is not loaded.
Run
php artisan env
in the command line in order to check your environment.
Current application environment: production.
In the .env file it is set to 'local'.
For me it was a permissions issue... the web server user didn't have permission to read from .env.
*I'm using capistrano to create the .env file so this isn't the likely scenario for most folks.
So what was the problem ? I am also having same issue. The app seems to not read the .env.production The chmod is 777 for that file but still seems to be not visible ! How did you solved it ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community