Selfcoded
Selfcoded

Reputation: 95

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?

Upvotes: 4

Views: 2951

Answers (1)

andrewtweber
andrewtweber

Reputation: 25559

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

Upvotes: 7

Related Questions