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

jimmck's avatar

@vincej That gets generated when you generate models. You mean this?

Jamess-MacBook-Pro:laravel5 jimm$ art ide-helper:models

 Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead? (Yes/No):  (yes/no) [no]:
 >

jimmck's avatar

@vincej The end result is ...

Jamess-MacBook-Pro:laravel5 jimm$ art ide-helper:models

 Do you want to overwrite the existing model files? Choose no to write to _ide_helper_models.php instead? (Yes/No):  (yes/no) [no]:
 > yes

Written new phpDocBlock to /Users/jimm/GitHub/laravel5/app/lib/myutils/MyModel.php
Written new phpDocBlock to /Users/jimm/GitHub/laravel5/app/User.php

No _ide_helper_models.php is written...

vincej's avatar

Hmmm ... don't know .. how about I just reinstall Barry's package leaving out any reference to the _ide_helper_models.php ??

jimmck's avatar

@vincej The GitHub page says to run artisan clear-compiled BEFORE generate to get get rid of compiled file. And to run optimize after. Also do you do this in your composer file?

    "post-update-cmd": [
      "php artisan clear-compiled",
      "php artisan ide-helper:generate",
      "php artisan optimize"

Of course you have to re-open Storm for it to make a difference.

vincej's avatar

@jimmck

Ok, I have not reinstalled yet. However, I ran clear compile and optimize I also added the post-update-cmd as suggested and it made no difference.

Did you intend that I reinstall with these instructions ?

vincej's avatar

@jimmck @jimmck

Something has improved - the "multiple instances" error has gone away !

It's nearly 6pm out west, and I have got to get off the computer otherwise I will be missing my manhood. :o)

If you can still tolerate me, I talk some more tomorrow :o)

Many thanks for all your patience !

Daniel-Pablo's avatar

For PHP Storm you got to install this plugin

https://github.com/barryvdh/laravel-ide-helper

this is the order in what that plugins works on my end APRIL 2023

composer require --dev barryvdh/laravel-ide-helper

add this to providers -> config/app.php

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

RUN THIS CODE

php artisan clear-compiled

php artisan ide-helper:generate

ADD THIS TO THE MODEL that you wish to have this feature working - note that this need to go on top of the class

use Eloquent;
/**
 * @mixin Eloquent
 */
class User extends Authenticatable
{
Previous

Please or to participate in this conversation.