Search code examples
phplaravelauthenticationvisual-studio-codelaravel-10

Undefined type 'Auth'.intelephense(P1009)


Using Laravel 10 and VS Code this line was considered error:

Auth::routes();

VS Code says:

Undefined type 'Auth'.intelephense(P1009)

But no problem in the webapp.

I've already tried to do:

CTRL + SHIFT + P --> digit "Index workspace" --> Enter

but it doesnt work


Solution

  • Add this in your routes/web.php or, Where you are applying Auth

    use Illuminate\Support\Facades\Auth;