Generates helper files and model PHPDocs so editors autocomplete Laravel facades, models, and container bindings. Runs as Artisan commands inside your Laravel project.
Overview
Laravel IDE Helper is a Composer package that scans a Laravel application and writes PHPDoc helper files tailored to your project. The goal is accurate IDE autocompletion for framework APIs and your own models without hand-maintaining every annotation.
Artisan commands can regenerate facade documentation into a configurable helper file, introspect Eloquent models from the database schema to add properties and relation types, and emit PhpStorm meta files so container resolutions autocomplete. Generation reflects files currently in the project, so helpers can be refreshed as code changes.
Model documentation can land in a separate file, be appended directly to model classes, or use a mixin tag to avoid duplicate-class warnings in the IDE. Options exist to reset existing docs, ignore selected models, scan custom model directories, and tune magic where/count properties or generics-style collection annotations.
Facade generation can include real-time facades, optional helper function files, and macros or mixins when type hints are declared. Some generators need a working database connection; an in-memory SQLite option supports environments without a default connection. PhpStorm meta generation may require trimming unused providers from config when classes are missing.
Key features
- Facade PHPDoc via Artisan generate
- Eloquent model property and relation docs
- PhpStorm meta for container bindings
- Write to models or separate helper files
- Configurable model scan directories
- Real-time facade mixin support
- Macro and mixin PHPDoc when typed
- Optional in-memory SQLite for facades
Use cases
- PhpStorm autocomplete for Laravel facades
- Documenting Eloquent models from schema
- Team-shared IDE helper after composer update
- Mixin-based model docs without duplication
- IoC binding hints in PhpStorm