I dont know why the error message keep showing in my problem tab
that message show after adding method destroy
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.