title: Should I be using env() outside my config files?
body: <p>I stumbled across this <a href="https://laravel.com/docs/5.4/configuration#configuration-caching" rel="noreferrer">https://laravel.com/docs/5.4/configuration#configuration-caching</a> in the documentation and it confused me a bit.</p>
  
  <p>When I want an environment variable I use the env() function to return what I want. According to the above link it says I should be using the config() function instead to ensure that on production I am accessing the values through a cache.</p>
  
  <p>e.g. These both return the same thing</p>
  
  <p><code>env('APP_URL')
  </code></p>
  
  <p>vs</p>
  
  <p><code>config('app.url')
  </code></p>
  
  <p>So should I be using <code>config()</code> or <code>env()</code> inside my app?</p>
  
  <p>I assume that if I add a new env variable I will also need to update my config files?</p>