barryvdh/laravel-ide-helper for PhpStorm


Generates a file that PhpStorm understands, so it can provide accurate autocompletion. Generation is done based on the files in your project, so they are always up-to-date.

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" ],