title: How to access env file from the root of the Laravel Project?
body: <p>I have a <strong>php</strong> script locate at the <strong>root</strong> directory of my laravel project.
  I want to access my settings in my .env</p>
  <hr />
  <h1>I've tried</h1>
  <pre><code>$dbname      = env('DB_DATABASE');
  $user        = env('DB_USERNAME');
  $host        = env('DB_HOST');
  $pass        = env('DB_PASSWORD');
  </code></pre>
  <hr />
  <h1>I got</h1>
  <pre><code>PHP Fatal error:  Call to undefined function env()
  </code></pre>
  <hr />
  <p>What is the workaround for that ? Should I include anything to be able to access <code>env()</code>?</p>