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 IlluminateSupportFacadesLog;
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?
2
Answers
You can try
barryvdh/laravel-ide-helper
.it makes VScode to refer Facade files.
example)
A solution which is really a life saver here is the
php namespace resolver
extension, it gives you all the possible options that you want as a dropdown menu.Here is the link