Reputation: 1235
Well, basically I got this error when I moved my project from local to production. In local it works perfectly. At first I thought Laravel wasn't reading .env, so I hardcoded the access data in database.php, but anything changed. I'm in a shared hosting and I don't hace access to the console. Any ideas?
Upvotes: 1
Views: 2339
Reputation: 8059
If it doesn't pick up .env, it could means it's reading directly from the cached config. Changing database.php
wouldn't help because config has been cached.
In your production file manager, look for /bootstrap/cache/config.php
and delete it. It will manually clear the config cache on your production server and laravel should now picking up database configuration string from .env again.
Upvotes: 3