dottedai/laravel-model-annotator
Automatically generates PHPDoc annotations for Laravel Eloquent models, adding @property, @method and relationship hints so your IDE and static analysers understand attributes, scopes and relations without guesswork.
@property / @method docblocks on Eloquent models, this is a candidate replacement for that homegrown script. The decision is small in scope but real: adopt a dependency vs. maintain ~50 lines of internal tooling.mixed" to "models have property and relation types."$order->customer-> autocompletes instead of requiring a trip to the schema or the migration files. This feeds onboarding-time and "time to first PR" metrics more than it feeds roadmap.Consider it when:
Look elsewhere when:
barryvdh/laravel-ide-helper yet. It is the mature, widely-adopted incumbent and its ide-helper:models command covers the same ground, including writing into model files. With 0 stars, 0 dependents, and a score of 0, this package has essentially no production evidence behind it. Default to the incumbent; adopt this only if a spike shows a clear, specific advantage.Practical adoption guardrails: install as require-dev, pin the version, run it via CI diff-check (fail the build if regenerated annotations drift), and keep a one-line fallback plan: switch to laravel-ide-helper or vendor the command.
To executives: A small, free, MIT-licensed developer tool that auto-documents our database models so our IDEs and code-quality checks understand them. It's a dev-only dependency with no runtime footprint and no customer impact, and it can be removed in about an hour if we don't like it. The upside is faster onboarding and fewer "what columns does this table have" interruptions; the cost is one dependency and a short evaluation spike. Low cost, low risk, modest and honest upside — not a platform decision.
To engineering: One Artisan command that reads each Eloquent model's table schema, relations, and casts and writes them back as docblocks. Wins: IDE autocomplete on model properties and relations, and a real foundation for Larastan/PHPStan coverage at higher levels. Caveats we should be upfront about: the package has no adoption yet (0 stars, 0 dependents), so we treat it as unproven — spike it against laravel-ide-helper on our three messiest models first, pin the version, and wire it into CI as a diff check so annotations can't silently rot. If the spike isn't a clear win, we use the incumbent and lose nothing.
How can I help you explore Laravel packages today?