thedoctor0/laravel-factory-generator
Laravel Factory Generator automatically creates model factories from your existing models and database schema. It inspects columns and relationships to scaffold realistic factories, saving time when testing and seeding Laravel applications.
--dry-run mode is the decision-relevant feature for process: you can preview generation output in a pipeline or a PR without mutating the working tree, which makes it safe to standardize as a repeatable step rather than a one-off local trick.Adopt when:
--dry-run) so output can be reviewed like any other generated artifact.Look elsewhere or skip when:
For executives: This is a small, free developer tool that removes the most tedious part of writing automated tests for our Laravel application. The practical effect is that a testing or platform-upgrade initiative becomes cheaper in engineer-hours without adding headcount, and it carries no production risk because it never ships to customers. The 1.5.0 release is the one that makes it dependable: the maintainer added an automated test suite, fixed a crash that hit fresh repositories, and added a safe preview mode so output can be reviewed before anything is written. Recommend adopting it as a pinned developer dependency, with the caveat that it is maintained by a single author — which is acceptable for tooling that only runs on developer machines.
For engineering: Version 1.5.0 is the first release I'd call safe to standardize on. Concretely: a real test suite now exists, the missing-factories-directory crash is fixed (the failure you'd otherwise hit on every fresh clone), the enum driver is hardened for modern Laravel/PHP, Faker usage is modernized, and --dry-run lets you preview output — so you can wire it into CI or a PR review step without it silently rewriting files. Treat generated factories as a starting draft, not final code: expect to hand-edit custom casts, non-convention relations, and polymorphic associations. Pin the version in composer.lock, keep it in require-dev, and review generated diffs like any other generated artifact.
How can I help you explore Laravel packages today?