1

I dont know why the error message keep showing in my problem tab

This screenshot my vscode enter image description here

that message show after adding method destroy

3 Answers 3

4

If the code is working fine, then it's just your ide complaining.

Please try the following package:

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

then run:

php artisan ide-helper:generate 

This package will then install the necessary files for your ide.

Note: You will need to run generate command whenever you have new package installed to avoid error from your ide.

more on ide helper

Sign up to request clarification or add additional context in comments.

Comments

2

The Auth::user() return type is not the User model instance. And that's why it's shown as error. You can use comment to define the variable as an instance of the User model like,

/** @var User $ketua */ $ketua = Auth::user(); 

Comments

0

Intelephense extension is checking for Undefined Methods, if you don't want that warning Add this line in your vs code settings.json file.

"intelephense.diagnostics.undefinedMethods": false 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.