Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincej's avatar
Level 15

Why Does PHPStorm Not Recognise All The Classes

Hi - I have uploaded barryvhd/laravel-ide-helper and added it to app/config/app

I haver also done a composer dumpautoload. Never the less I get a warning message from PHPStorm saying, for example, "Eloquent undefined class"

I do have inspections turned on.

I thought barry's stuff prevent all that.

Many thanks !

0 likes
6 replies
vincej's avatar
Level 15

Many thanks - I have to admit my ignorance. I did not understand the purpose of php artisan clear-compiled before running php artisan ide-helper:generate.

coeuscc's avatar

Both of the tips were helpful, but I think the cache invalidation was a key step for me. Both have tripped me up at various points.

jimmck's avatar

Remember to Synchronize your projects when Storm is open and you update or change code external your work. Like anything in Vendor or linked to in your composer.json

edgreenberg's avatar

I went through the suggestions above: php artisan clear-compiled php artisan ide-helper:generate invalidating cache

In my controller, I do $me=Auth::user() and it all methods in $me are properly found. I also do $user = User::find(intval($user_id)) and all of those methods are still underlined and 'not found'. In User::find, the find is underlined.

Any suggestions? Using Laravel 5.5 and Phpstorm 2017.3.

Please or to participate in this conversation.