Option 1: Update intelephense Settings
The 1st option is to remove the "**/vendor/**" from the "exclude" settings available to the "intelephense" config.
"intelephense.files.exclude": [ "**/vendor/**", <== remove this line! "**/.git/**", "**/.svn/**", "**/.hg/**", "**/CVS/**", "**/.DS_Store/**", "**/node_modules/**", "**/bower_components/**", "**/resources/views/**" ]
Option 2: Install laravel-ide-helper
The 2nd option Install laravel-ide-helper which will generate all of the helper classes for intelephense.
composer require --dev barryvdh/laravel-ide-helper
Option 3: Update intelephense undefinedTypes
The other possible options is to set the "undefinedTypes" of the "intelephense.diagnostics" to false. This solution is the simplest so far so it's highly recommended.
"intelephense.diagnostics.undefinedTypes": false
Leave a reply