I decided to use PhpStorm for my new Laravel project, so I thought I wanted some autocompletion. I did read the guide from https://blog.jetbrains.com/phpstorm/2015/01/laravel-development-using-phpstorm/ and some of it works fine, but I got a problem.
I wanted to test my DB connection, so I just made a simple index() function like this
if(DB::connection()->getDatabaseName()) {
echo 'Connected to ' . DB::connection()->getDatabaseName();
}
Which works fine, but when I write DB and press Tab I write \DB:: instead of DB::. Then I include use Illuminate\Support\Facades\DB; and DB:: 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.
Someone else had this problem and is there a solution for it?