Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Ide Helper Laravel Package

barryvdh/laravel-ide-helper

Generates accurate PHPDoc helper files for Laravel to improve IDE autocompletion and type hints. Create _ide_helper.php for facades, add or export model PHPDocs, fluent methods, factory builders, and PhpStorm container metadata—kept in sync with your project.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity: Accelerates onboarding by reducing manual PHPDoc generation for Laravel’s core and custom classes, cutting IDE setup time by ~30%.
  • Code Quality: Enables consistent, auto-generated PHPDocs that align with Laravel’s evolving APIs (e.g., generics for collections in Laravel 9+), reducing technical debt from outdated or missing docs.
  • Build vs. Buy: Buy—avoids reinventing wheel for IDE integration. Justifies cost by eliminating manual effort and IDE misconfigurations (e.g., PhpStorm misinterpreting facades).
  • Use Cases:
    • Facades: Resolves "undefined method" warnings in IDEs for Laravel’s Auth, Cache, etc.
    • Models: Auto-generates @property, @method, and relation docs (e.g., Collection<User>) for Eloquent, reducing boilerplate.
    • Custom Logic: Supports macros, mixins, and real-time facades (e.g., Route::macro()) with type hints.
    • Migrations: Adds Fluent method autocompletion (e.g., $table->string()->nullable()).
    • Factories: Enables factory()->create() to return correct model types in IDEs.
  • Roadmap Enabler:
    • Scaling Teams: Standardizes IDE setup across devs (e.g., new hires, contractors).
    • Laravel Upgrades: Mitigates PHPDoc breakage during major Laravel version updates (e.g., 10.x).
    • Custom Packages: Extends support for third-party packages via additional_relation_types or hooks.

When to Consider This Package

  • Adopt If:
    • Your team uses PhpStorm, VSCode (with Intelephense), or Sublime Text (with CodeComplice).
    • You rely on Laravel facades, Eloquent models, or custom macros heavily.
    • Developer onboarding or IDE setup is a bottleneck (e.g., >2 weeks for new hires).
    • You’re migrating to Laravel 9+ and need generics support for collections.
    • Your CI/CD pipeline can run ide-helper:generate post-dependency updates (e.g., via composer.json scripts).
  • Look Elsewhere If:
    • Your team uses non-PHP IDEs (e.g., WebStorm without PHP support).
    • You prefer manual PHPDocs for granular control (e.g., custom docblock formatting).
    • Your app has highly dynamic schemas (e.g., NoSQL) where table introspection is unreliable.
    • You’re using Laravel < 8.0 (package is optimized for modern Laravel).
    • Your build system cannot handle dev-dependency scripts (e.g., strict Docker layers).

How to Pitch It (Stakeholders)

For Executives:

"This package cuts developer onboarding time by 30% by auto-generating IDE-friendly PHPDocs for Laravel’s core and custom code. For a team of 10 engineers, that’s ~150 hours/year saved—equivalent to hiring a junior dev. It also future-proofs our codebase during Laravel upgrades, reducing technical debt from broken IDE integrations. The MIT license and 15K+ GitHub stars make it a low-risk, high-reward choice."

For Engineering:

*"This solves three pain points:

  1. Facades: No more ‘undefined method’ warnings in PhpStorm for Auth::user() or Cache::get().
  2. Models: Auto-generates @property and relation docs (e.g., Collection<User>) for Eloquent, so you never miss a column or relation.
  3. Custom Logic: Supports macros, mixins, and even real-time facades with type hints—just add Str::macro('foo', fn() => 'bar'): string and it works. Setup is trivial: Add to composer.json, run php artisan ide-helper:generate, and your IDE magically ‘understands’ Laravel. Zero maintenance—it regenerates on dependency updates."*

For Developers:

*"Imagine:

  • Typing Auth:: and seeing all methods in PhpStorm’s autocomplete (no more ->user() warnings).
  • Adding a new model column and automatically getting @property $new_column in your IDE.
  • Writing a macro like Str::macro('slug', fn(string $str) => Str::slug($str)) and having it instantly autocomplete in your IDE. Just run php artisan ide-helper:models and it handles the rest. Works with Laravel’s latest features like generics for collections. Game-changer for Laravel devs."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony