Logo Questions Linux Laravel Mysql Ubuntu Git Menu

Laravel 5: Installing ide helper for Netbeans

Im trying to implement Laravel ide helper: barryvdh/laravel-ide-helper . Tried downloading gist, putting it in root folder of my project but it did not work. Also tried installing it with composer and adding Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class in the config/app.php file. Both methods didnt work even when I restarted netbeans.

Using Ubuntu and Laravel 5.1.20

Anyone have idea what im doing wrong?

like image 574
Selfcoded Avatar asked Mar 15 '23 11:03


1 Answers

Installing it with composer isn't enough, you still have to generate it with this command:

php artisan ide-helper:generate

Better yet add it as a post-update-cmd to composer.json:

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

(the other 2 should already be there)

Then whenever you run composer update it will automatically generate a new IDE helper file. Finally, don't forget to add _ide_helper.php to your .gitignore file

like image 94
andrewtweber Avatar answered Mar 17 '23 00:03