title: Laravel - custom .env file
body: <p>Laravel assumes that <code>.env</code> file should describe environment, and it should not be committed to your repo.</p>
  
  <p>What if I want to keep both <code>.env</code> files for <code>dev</code> and <code>production</code> (say <code>.env-production</code> and <code>.env-dev</code>) in my repo and add some custom logic to which file should be used, for example based on current domain name.</p>
  
  <p>Something like</p>
  
  <pre class="lang-php prettyprint-override"><code>if ($_SERVER['HTTP_HOST'] == 'prod.domain.com') {
      load('.env-production');
  } else {
      load('.env-dev');
  }
  </code></pre>
  
  <p>How can i achieve it?
  Thanks!</p>