I'm experiencing some odd conflict between projects lately.
Basically I have these variables in my .ENV:
DB_HOST DB_DATABASE DB_USERNAME DB_PASSWORD
Let's say I have 2 projects both have the same environment variables but totally different projects/folders.
When one project is accessing the database the 2nd project that attempts to access the database will attempt to connect to the first project's credentials due to the fact the environment variables share the same name.
Both databases are also different. I've tested it by purposely putting them on 2 different mysql servers but that didn't solve it.
Once the first project is done accessing the database, the 2nd project is now working again.
I tested this theory by changing the 2nd project .ENV variables to:
DBHOST DBDATABASE DBUSERNAME DBPASSWORD
And it worked both at the same time. I'd rather not have to make special prefixes (project1-DB-HOST) for every project so they won't try to access each other.
If it matters I'm using Laragon because it's a much simpler setup than Homestead. It's basically just a form of Wamp setup.
Now I don't believe it's a database issue but more so any same named enviornment variable will cause conflicts.
Just a bit confused what's really happening here and how to get around this. Hope someone could shed some light.
Thanks.