laravel autocomplete in PhpStorm

You install PhpStorm and find that autocomplete doesn’t work properly.

How to fix that problem

Install package https://github.com/barryvdh/laravel-ide-helper using composer:

composer require --dev barryvdh/laravel-ide-helper

Open config/app.php Add service provider to array providers:

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class

To make it alive you need to generate file _ide_helper.php . To do that just run command:

php artisan ide-helper:generate

Additional commands

Add \Eloquent helper to \Eloquent\Model

php artisan ide-helper:eloquent

Generate metadata for PhpStorm to add support for factory design pattern

php artisan ide-helper:meta

You want to see available fields(column names) of Model, then need to execute followed command:

php artisan ide-helper:models
Check that you have correct database connection before running.

Video tutorial

You might also like



Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.