Laravel : random error : SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
<p>I'm getting this error randomly when using my laravel application:</p>

<blockquote>
  <p>SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected</p>
</blockquote>

<p>If I refresh the browser, I'm not getting this error. It's really weird because it's working correctly before and after.</p>

<p>My database credentials are stored in .env file</p>

<p><strong>EDIT</strong></p>

<p>Here the content of my file : </p>

<pre><code>APP_ENV=local
APP_DEBUG=true
APP_KEY=6cYKHzpblHGfE3H0n6j2tSRjoqJsgcqd

DB_HOST=localhost
DB_DATABASE=gestion-inscriptions-v2
DB_USERNAME=root
DB_PASSWORD=
</code></pre>

<p><strong>EDIT 2</strong>
And here the database.php : <a href="http://laravel.io/bin/bE95X" rel="nofollow">http://laravel.io/bin/bE95X</a></p>

<p><strong>EDIT 3</strong>
Still got this error, even on other computer (working with wamp)</p>

<p>Thanks in advance</p>

<p>PS : I know there is already the same questions on SO but there is no correct answer that works for me so ...</p>