Skip to content
Advertisement

Laravel – custom .env file

Laravel assumes that .env file should describe environment, and it should not be committed to your repo.

What if I want to keep both .env files for dev and production (say .env-production and .env-dev) in my repo and add some custom logic to which file should be used, for example based on current domain name.

Something like

JavaScript

How can i achieve it? Thanks!

Advertisement

Answer

Nadeem0035 gave me pretty good idea what to do

bootstrapapp.php right before return $app;

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement