Open terminal in PhpStorm in your Laravel project and type:
composer require barryvdh/laravel-ide-helper
Then type:
composer update
After updating composer, add the service provider to the providers array in config/app.php:
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
Then type:
php artisan clear-compiled
Then generate file with:
php artisan ide-helper:generate
Then:
php artisan optimize
You can configure your composer.json to do this after each commit:
"post-update-cmd": [ "php artisan clear-compiled", "php artisan ide-helper:generate", "php artisan optimize" ],