Posts Learn Components Snippets Categories Tags Tools About

Make PHPStorm Smarter with Laravel IDE Helper

Learn how to make PHPStorm smarter with autocompletion to provide better programming experience with Laravel IDE Helper Generator.

Created on Jul 28, 2021


To make your PHPStorm smarter, you can make use Laravel IDE Helper Generator where it will generate all of the necessary helper files for the project. By having it installed, it will help PHPStorm to index all the necessary files for better autocomplete, inspection, tracing, and more.

Install Laravel IDE Helper Generator
Use composer to install the package.
composer require --dev barryvdh/laravel-ide-helper

Generate the Helper File
Run the command below to generate the helper file. The necessary file will be automatically generated and you might need to restart PHPStorm to let it reindex the files.
php artisan ide-helper:generate
php artisan ide-helper:meta

Automate Helper File Generation
Sometimes it's better to automate the helper file generation such as after updating composer dependencies. To set this up you can update the "scripts" part of your composer.json file like below.
"scripts": {
    "post-update-cmd": [
        "@php artisan ide-helper:generate",
        "@php artisan ide-helper:meta"

So now when you run "composer update" the post-update command will be triggered and the helper will be generated.

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

Load comments for Make PHPStorm Smarter with Laravel IDE Helper