barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.17k stars 1.16k forks source link

Autocompletion for Model methods is not avaliable #1342

Closed abelharisov closed 2 years ago

abelharisov commented 2 years ago

Versions:

Description:

Autocompletion is not available for some methods.

image

Commands used to generate helpers:

  artisan ide-helper:generate
  artisan ide-helper:models -M
  artisan ide-helper:meta
mfn commented 2 years ago

I can't reproduce this, models -M and meta generate the files which allow my models to autocomplete ::whereHas for me

redelschaap commented 2 years ago

Same issue here. My IDE can't see all the "regular" query builder methods anymore (like find() or first()).

I am using:

Only methods available are:

FatBoyXPC commented 2 years ago

@mfn do you have @mixin \Eloquent next to @mixin IdeHelperFoo or in the _ide_helper_models.php list of methods/properties for the Foo model? If so, that's why this is working for you. I'm on ide-helper 2.12.3 and I don't see @mixin \Eloquen anywhere, nor do the classes defined in _ide_helper_models.php extend \Eloquent like the file used to in the past.

SkoricIT commented 2 years ago

Doing ide-helper:eloquent and after that re-doing ide-helper:models -M fixed the issue for me. \Eloquent is now in the models file.

FatBoyXPC commented 2 years ago

Oh wow, I didn't realize ide-helper:eloquent was a thing! Thank you!

SkoricIT commented 2 years ago

@barryvdh Thanks!

radcloudcorp commented 7 months ago

No configuration I make can work here, the options always look like this without showing the rest:

Screenshot 2024-02-20 at 16 21 54