finds.dev← search

// the find

barryvdh/laravel-ide-helper

★ 14,942 · PHP · MIT · updated May 2026

IDE Helper for Laravel

laravel-ide-helper generates PHPDoc files from your Laravel project at runtime so that PhpStorm and similar IDEs actually understand Facades, Eloquent models, and the IoC container. It's the package that makes `Auth::user()` return the right type instead of `mixed`. Every serious Laravel project on PHP-typed IDE tooling installs this.

The model command introspects your actual database schema rather than guessing, so generated `@property` annotations match reality. The `--write-mixin` flag is a good middle ground — keeps model files clean while still giving IDE autocomplete without duplicate-declaration noise. Real-time facades are handled automatically once the framework has generated the cache files. The hook system (`ModelHookInterface`) lets you inject custom properties from non-standard sources without forking the package.

The model command requires a live database connection, which makes it awkward in CI or containerized environments where the DB isn't up during the static-analysis step. Generated files (`_ide_helper.php`, `_ide_helper_models.php`) need to be committed or regenerated post-install, and teams regularly forget to re-run after schema changes — stale annotations silently mislead the IDE. `--write -RW` wipes custom PHPDoc comments on models since `--reset` is baked into the recommended workflow. VS Code support is second-class; the meta file is PhpStorm-specific and the README barely acknowledges other editors.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →