
IDE Helper
Generates PHPDoc files so your IDE can autocomplete Laravel facades, models, and more.barryvdh/laravel-ide-helper
- Stars
- 15k
- Forks
- 1.2k
- Licence
- MIT
- Language
- PHP
- Last update
- 2 months ago
- Type
- Dev tool
What it is
This is a Composer package for Laravel projects. It reads your project's code and generates helper files that let your code editor offer accurate autocompletion and type hints for Laravel facades and Eloquent models. Because it generates from your current files, the helpers can be regenerated whenever the project changes.
- Generate _ide_helper.php so the editor can autocomplete Laravel facade methods
- Generate model PHPDocs listing properties, relations, and query methods
- Create a PhpStorm meta file for container instances with php artisan ide-helper:meta
- Add the generator commands to composer.json so helpers refresh after dependency updates
Great for
- Laravel developers who use an IDE such as PhpStorm or VS Code and want better autocompletion
- Teams on Laravel 10 or later, since the 3.x branch supports that range
- Projects with Eloquent models that want generated property and method PHPDocs
Not ideal for
- Projects on Laravel versions older than 10, which the README says should use the 2.x releases instead
- Setups without a working database connection, since model generation requires one and some facades may be skipped
- Sublime Text users without extra tooling, since the README says CodeComplice is needed there
How to get it
- 1
Install with a package manager
You'll need: PHP · Composer · Laravel 10 or later for the 3.x branch
Install as a dev dependency
composer require --dev barryvdh/laravel-ide-helper - 2
Run it
- Install the package with the Composer command above
- Run php artisan ide-helper:generate to create _ide_helper.php
- Run php artisan ide-helper:models -RW to add PHPDocs to your models, after backing them up
- Run php artisan ide-helper:meta to create the PhpStorm meta file if you use PhpStorm
- 3
Get the most out of it
- Add ide-helper:generate and ide-helper:meta to the post-update-cmd scripts in composer.json to refresh helpers after updates
- Use --write-mixin (-M) to keep generated PHPDocs in a separate file and avoid duplicate results in your IDE
- Use the -M option on facade generation when there is no working database connection to create an in-memory SQLite connection
- Publish the config file to change class mappings, default helpers, or ignored models
Downloads
Strengths
- Generated from your project files, so the helpers track the code as it changes
- Offers several output options, such as separate files or mixin tags, to avoid duplicate-declaration warnings
- Widely used, with an MIT license and a public test badge in the README
Trade-offs
- Model generation needs a working database connection to read table columns
- The README warns to back up models before writing PHPDocs into them, and resetting can remove custom comments
- Some real-time facade and macro features depend on framework cache files or type hints being present
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| laravel-ide-helper (this) | 15k | Dev tool | beginner | 2 months ago | Laravel developers who use an IDE such as PhpStorm or VS Code and want better autocompletion |
| filament | 32.4k | Library | intermediate | 4 days ago | Laravel developers building internal admin panels |
| coc.nvim | 25.1k | App | intermediate | 10 days ago | Vim or Neovim users who want autocompletion and language features similar to VS Code |
| laravel-debugbar | 19.3k | Library | beginner | 9 days ago | Laravel developers investigating slow pages or unexpected database queries |
| sage | 13.3k | Framework | intermediate | 29 days ago | Developers building custom WordPress themes |
| ui | 127k | Library | intermediate | 4 days ago | Developers building React or Next.js interfaces who want full control over component code |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.