title: PhpStorm and Laravel autocompletion
body: <p>I decided to use PhpStorm for my new Laravel project, so I thought I wanted some autocompletion. I did read the guide from <a href="https://blog.jetbrains.com/phpstorm/2015/01/laravel-development-using-phpstorm/" rel="nofollow noreferrer">https://blog.jetbrains.com/phpstorm/2015/01/laravel-development-using-phpstorm/</a> and some of it works fine, but I got a problem.</p>
  
  <p>I wanted to test my DB connection, so I just made a simple <code>index()</code> function like this</p>
  
  <pre><code>if(DB::connection()-&gt;getDatabaseName()) {
      echo 'Connected to ' . DB::connection()-&gt;getDatabaseName();
  }
  </code></pre>
  
  <p>Which works fine, but when I write <code>DB</code> and press <kbd>Tab</kbd> I write <code>\DB::</code> instead of <code>DB::</code>. Then I include <code>use Illuminate\Support\Facades\DB;</code> and <code>DB::</code> works. But when I added the facade, the autocompletion isn't the same at all and it cant find the methods but they works. It's really annoying.</p>
  
  <p>Someone else had this problem and is there a solution for it?</p>