backtheweb/laravel-package-maker
Laravel Package Maker helps scaffold Laravel packages quickly by generating a ready-to-publish structure, boilerplate classes, config, service provider, tests, and composer setup. Ideal for jumpstarting reusable components and standardizing package creation.
composer.json, src/, tests/, config/, and migrations/). This aligns perfectly with a TPM’s goal of reducing technical debt in package-based architectures (e.g., modular monoliths, microservices, or plugin systems).--template flag) and predefined skeletons (e.g., API packages, CLI tools), allowing TPMs to enforce consistent package structures across teams.php artisan package:make) replaces manual scaffolding, reducing onboarding time for developers.laravel/package-tools (for publishing). May conflict with existing tooling. Mitigation: Audit dependencies post-generation.vendor/package-name) be standardized?README.md sections) to refine templates.api-package, cli-tool) in a shared templates/ directory.php artisan package:make MyApiPackage --template=api-package --namespace=App\\Packages
- name: Validate Package Structure
run: php artisan package:validate MyPackage
templates/legacy/.--force and manually adjust config/ paths.composer.json overrides if needed.laravel/package-tools conflicts by either:
--no-dev flag for production packages.src/ vs. root-level classes).src/:
find . -name "*.php" -not -path "./src/*" -exec mv {} src/ \;
composer.json).templates/v2/).composer.json may include unnecessary dev dependencies. Audit and prune post-generation.composer remove --dev pestphp/pest laravel/package-tools
vendor/package-name in templates.php artisan package:publish to onboarding docs.--verbose flag for CLI output.base-package + api-features).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Corrupted template files | Broken package structure | Pin template versions in composer.json |
| Laravel version mismatch | Package fails to register | Add version checks in bootstrap.php |
| Dependency conflicts | CI/CD pipeline failures | Use composer why-not to debug |
| Template not found | CLI command fails | Document template paths in README |
| Post-generation manual edits | Inconsistent package structures | Enforce pre-commit hooks |
--no-interaction, --force).laravel-package-template repo with team-specific configs.How can I help you explore Laravel packages today?