In VSCode the PHP intelephense extension version 1.3.7 marks the laravel Facades as classes not found. Before if you import a Facade like this:
use Log;
and then use it in the file like this:
Log::info('some message');
which is correct there were no issues. Now every usage is marked as a syntax error and you have to import the fully qualified name like the following for the error to go away.
use \Illuminate\Support\Facades\Log;
Also it didn't used to complain about the Eloquent class's methods like find
or where
etc but now it underlines them as methods not defined.
Is there a way for the extension to ignore these?
Visual Studio Code is an amazing code editor, one of my favorites next to Atom and Sublime Text. Laravel is my favorite when it comes to enterprise PHP development. In this article, let me show you how I have configured Visual Studio Code(vscode from now on) for Laravel development.
You can try barryvdh/laravel-ide-helper
.
it makes VScode to refer Facade files.
example)
"require-dev": {
...
"barryvdh/laravel-ide-helper": "^2.7",
...
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With