Undefined functions/methods - Intelephense(1013) - Laravel Homestead + VScode

Viewed 5819

I have been working on learning laravel. I am using Homestead in conjunction with virtualbox - and my IDE is vscode. I have been getting the "problem lines" under inane things in my IDE... see below: enter image description here

I cant figure out why something like "view" or "isNot" has those error lines. Everything works fine I am just wondering why the IDE is throwing intelephenser(1013) problems at me.

Here is the errors it is throwing: enter image description here

Any ideas on getting rid of this would be appreciated! :D

1 Answers

Laravel has global helper function and class aliases declared

You can use barryvdh/laravel-ide-helper to help your IDE recognize the helpers and aliases.

Follow this guide if you struggle installing it.

basicly

$ composer require --dev barryvdh/laravel-ide-helper

$ php artisan ide-helper:generate
$ php artisan ide-helper:meta
$ php artisan ide-helper:models --nowrite
Related