title: "Access denied for user ''@'localhost' to database 'forge" appears randomly
body: <p>I have a search function for my database but sometimes I get this message:</p>
  
  <pre><code>[2016-02-04 07:03:18] local.ERROR: PDOException: SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'forge' in C:\xampp\htdocs\reko\api\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:55
  Stack trace:
  #0 C:\xampp\htdocs\reko\api\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(55): PDO-&gt;__construct('mysql:host=loca...', 'forge', '', Array)
  ...
  </code></pre>
  
  <p>In one of ten calls I get this 500 error message, but I don't know why. The other calls give the right result.</p>
  
  <p>.env</p>
  
  <pre><code>APP_ENV=local
  APP_DEBUG=true
  APP_KEY=bJM6O0MnrIPaTNwKKOqNJkGinRDv1fnc
  
  DB_HOST=localhost
  DB_DATABASE=reko
  DB_USERNAME=root
  DB_PASSWORD=
  
  CACHE_DRIVER=file
  SESSION_DRIVER=file
  QUEUE_DRIVER=sync
  </code></pre>
  
  <p>Search function:</p>
  
  <pre><code>public function search(Modul $modul, Request $request)
  {
      $question = Question::whereModulId($modul-&gt;id)
          -&gt;where('value', 'LIKE', '%' . $request-&gt;get('keywords') . '%')
          -&gt;with('tags')
          -&gt;whereHas('exams', function ($query) use ($request) {
              $query-&gt;where('date', '&gt;=', $request-&gt;get('year').'-01-01');
          });
      if (!$request-&gt;get('parent'))
          $question-&gt;where('type', '&lt;&gt;', 'parent');
      if (!$request-&gt;get('own'))
          $question-&gt;where('type', '&lt;&gt;', 'own');
      if (!$request-&gt;get('normal'))
          $question-&gt;where('type', '&lt;&gt;', 'normal');
      if ($request-&gt;get('answered'))
          $question-&gt;has('answers');
      return $question-&gt;paginate(10);
  }
  </code></pre>
  
  <p>database.php</p>
  
  <pre><code>'mysql' =&gt; [
          'driver'    =&gt; 'mysql',
          'host'      =&gt; env('DB_HOST', 'localhost'),
          'database'  =&gt; env('DB_DATABASE', 'forge'),
          'username'  =&gt; env('DB_USERNAME', 'forge'),
          'password'  =&gt; env('DB_PASSWORD', ''),
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
          'strict'    =&gt; false,
      ],
  </code></pre>
  
  <p>I haven't modified the database.php file and all other calls work great.</p>