tomatophp/laravel-package-generator
A Laravel package generator that scaffolds new packages in seconds, creating service providers, config files, routes, migrations, and the full directory structure. It automates boilerplate so developers can focus on building reusable, publishable Laravel packages faster.
spatie/package-skeleton-laravel / an existing template repo. Because the output is ordinary Laravel code with no runtime dependency on the generator, this is a one-to-two-engineer-day spike with a near-zero reversal cost — not a procurement or architecture review cycle. Make the call and move on.Adopt or pilot it when:
require-dev, and keep it out of both the app lockfile and the generated package's require-dev.Look elsewhere when:
spatie/package-skeleton-laravel with spatie/laravel-package-tools and orchestra/testbench remains the de facto community standard, with far more usage and review surface.Hard gate before adoption: generate two to three representative packages, run them unmodified through your pipeline (composer validate --strict, Pint, PHPStan, Pest/testbench), and diff the output against internal standards. That diff plus one real release cycle of evidence is the entire decision input. Small diff → fork the stubs or wrap the command in an internal make:package script. Large diff → treat the exercise as a written specification for a homegrown template and decline the dependency. Do not publish internal guidance until a pilot package ships an actual release — generators that look fine after composer install can still be wrong about tagging, changelogs, and CI on the second commit.
To executives: This is a small, reversible developer-productivity experiment, not a platform bet. It automates the boilerplate that stands between a team and a working Laravel package — provider, config, migrations, routes, composer metadata — and it never runs in production, so there is no customer-facing risk and no change to our runtime dependency graph. Cost is a short spike plus a few hours per Laravel major to keep forked templates current; the return is hours saved per package created, multiplied by how many packages we spin up per quarter. Approve it as a pilot with a defined gate and a named owner, and expect a go/no-go decision within one release cycle.
To engineering leadership: The realistic plan is not "use the vendor command." It is: fork the stubs, encode our conventions in the fork, and expose a single internal make:package script that runs generation plus license headers, version floors, Pint/PHPStan/Rector configs, CI workflow, and README/CHANGELOG templates in one shot. That wrapper becomes the thing onboarding docs reference; the generator becomes an implementation detail we can swap or abandon without touching a single generated package.
To engineering teams: You get a working package skeleton in seconds instead of an afternoon of copying files, and every package you scaffold looks like every other package — which is what makes review fast and extraction to a monorepo boring. The trade-off is honest: you'll still do a human pass on the service provider, migration timestamps, config keys, and test harness, and if the output drifts from our standards the fix goes in the fork, not in your package.
To security and compliance: Dev-time tool only, MIT-licensed, installed globally or under require-dev, never published into a package we ship. Output is first-party code we review and own; the generator has no runtime presence and adds nothing to a consumer's dependency graph. Known maturity risk — single maintainer, low adoption — is mitigated by forking and pinning an exact version rather than by a vendor relationship.
What to say if we decline: The evaluation still pays for itself. The prompts this tool exposes and the diff against our conventions become the specification for our own template repo, and we walk away with a better internal golden path and a written record of why we didn't take the dependency.
How can I help you explore Laravel packages today?