@skyeewers You’ll get type-hinting for the query builder methods if you add ::query() after the model class name:
- $user = User::create();
+ $user = User::query()->create();
- $user = User::find($id);
+ $user = User::query()->find($id);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Laravel with the ide-helper plugin together with the LSP intelephense plugin for Sublime Text as well as in Panic's Nova with their Intelephense plugin.
Neither of the editors is able to give me syntax completion for static functions like User::create() and User::find() on any of my models. It's like the functions don't exist for Intelephense.
I've generated all helpers (Model, Eloquent and Meta) with the ide-helper and don't know anything else I could try here.
Anyone got any ideas for how to fix this? Am I just being silly? :D
@skyeewers You’ll get type-hinting for the query builder methods if you add ::query() after the model class name:
- $user = User::create();
+ $user = User::query()->create();
- $user = User::find($id);
+ $user = User::query()->find($id);
Please or to participate in this conversation.