explaingit

barryvdh/laravel-ide-helper

Analysis updated 2026-06-24

14,903PHPAudience · developerComplexity · 2/5Setup · easy

TLDR

Laravel IDE Helper generates PHPDoc files for Laravel projects so editors like PhpStorm and VS Code can autocomplete Facades, Eloquent models, and container bindings.

Mindmap

mindmap
  root((laravel-ide-helper))
    Inputs
      Laravel app code
      Eloquent models
      DB schema
    Outputs
      ide_helper.php
      Model PHPDoc blocks
      PhpStorm meta file
    Use Cases
      Better IDE autocomplete
      Type hints for Facades
      Documented models
    Tech Stack
      PHP
      Laravel
      Composer
      Artisan
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add accurate autocomplete for Laravel Facades in PhpStorm or VS Code

USE CASE 2

Generate PHPDoc blocks for Eloquent models from the database schema

USE CASE 3

Create a PhpStorm meta file so the IDE resolves service container bindings

USE CASE 4

Wire IDE helper generation into composer.json so docs refresh after every composer update

What is it built with?

PHPLaravelComposer

How does it compare?

barryvdh/laravel-ide-helperfreshrss/freshrsserusev/parsedown
Stars14,90315,01015,029
LanguagePHPPHPPHP
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install with composer require --dev and run a few Artisan commands, the 3.x branch requires Laravel 10 or later.

In plain English

Laravel IDE Helper is a developer tool that adds autocomplete intelligence to projects built with Laravel, the popular PHP web framework. Laravel uses a lot of dynamic and magic-method tricks, like Facades and Eloquent models with database-driven properties, that code editors cannot infer on their own. This package generates extra PHPDoc files describing those things, so editors like PhpStorm or VS Code can show accurate autocompletion, parameter hints, and type information. Installation is a single composer command: composer require --dev barryvdh/laravel-ide-helper, since the package is only needed during development. The README notes that the current 3.x branch supports Laravel 10 and later, and earlier Laravel versions should stay on the 2.x releases. The main commands are three Artisan console calls. php artisan ide-helper:generate creates an _ide_helper.php file describing all the Facades. php artisan ide-helper:models inspects your Eloquent model classes, reads their database table columns, relations, and getters/setters, and either writes that information directly into the model files or into a separate _ide_helper_models.php. php artisan ide-helper:meta creates a PhpStorm meta file so the IDE knows what concrete classes come back from the service container. The README walks through useful options: -W to write changes directly into model files, -R to reset existing PHPDoc blocks, -M to add a mixin tag instead of full docs (which avoids duplicate-annotation warnings), and -H to include helper files. There are knobs for ignoring certain models, scanning custom model directories, supporting real-time facades, and using an in-memory SQLite connection when the regular database is not available. Users often wire the generate and meta commands into composer.json so they run automatically after each composer update.

Copy-paste prompts

Prompt 1
Install barryvdh/laravel-ide-helper in a Laravel 11 project and generate the Facade and model docs
Prompt 2
Run ide-helper:models with the -W flag to write PHPDoc blocks directly into my Eloquent model files
Prompt 3
Add the ide-helper:generate and ide-helper:meta commands to composer.json so they run on every composer update
Prompt 4
Configure ide-helper to use an in-memory SQLite connection so model introspection works in CI

Frequently asked questions

What is laravel-ide-helper?

Laravel IDE Helper generates PHPDoc files for Laravel projects so editors like PhpStorm and VS Code can autocomplete Facades, Eloquent models, and container bindings.

What language is laravel-ide-helper written in?

Mainly PHP. The stack also includes PHP, Laravel, Composer.

How hard is laravel-ide-helper to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is laravel-ide-helper for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.