After you installed the IDE helper, did you also run the relevant artisan commands?
Jeffrey did a video about this issue: https://laracasts.com/series/how-to-be-awesome-in-phpstorm/episodes/15
MIght be worth giving that a watch
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using local query scopes ( https://laravel.com/docs/6.x/eloquent#local-scopes ) in a functioning app. Recently added CodeSniffer to PhpStorm, and I get all these problems since the scope is defined in the model as "scopeNameOfTheScope", but it's used in the controller as "nameOfTheScope".
See an example of the problem here: https://imgur.com/OMQqwp8
By the way, I have installed the Laravel plugin, and generated my ide_helper ( https://github.com/barryvdh/laravel-ide-helper )
Am I missing something? Is there any way I can tell CS to recognize scopes?
EDIT
Actually I realized it's not CodeSniffer, it's the Inspection. But my question remains, how do I tell PhpStorm that it's fine, it's just a local scope?
Please or to participate in this conversation.