Weave 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 Package Maker

Laravel Package Maker Laravel Package

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.

View on GitHub
Deep Wiki
Context7

A Laravel package to create new packages with a simple command

Frequently asked questions about Laravel Package Maker
How do I quickly scaffold a Laravel package with all the boilerplate files?
Run `php artisan package:make YourPackageName` in your Laravel project. This generates a complete package structure with folders for src/, config/, tests/, and a ready-to-register Service Provider, along with Composer and Laravel conventions.
Does this package support custom templates for different package types (e.g., API packages, CLI tools)?
Yes, use the `--template` flag to specify a custom template. For example, `php artisan package:make MyApiPackage --template=api-package`. You can also create your own templates in the `templates/` directory for team-specific needs.
Which Laravel versions are officially supported by this package?
The package is tested and optimized for Laravel 8.x and 9.x. For Laravel 7, you may need to use the `--force` flag and manually adjust paths in the generated config files, as some Laravel 8+ features are assumed.
Will this package generate tests and PHPStan/Pest configurations by default?
Yes, it includes a `tests/` directory with basic test files and pre-configures PHPStan, Pest, and Laravel Pint for modern PHP workflows. This ensures your package is ready for static analysis and testing out of the box.
Can I use this package in a non-Laravel PHP project (e.g., Symfony, Slim)?
No, this package is specifically designed for Laravel and assumes Laravel’s service provider, facade, and publisher patterns. It won’t work with non-Laravel PHP frameworks like Symfony or Slim.
How do I handle conflicts with `laravel/package-tools` if it’s auto-included?
If you encounter conflicts, you can either exclude it during generation or manually merge configurations post-generation. For production packages, consider using the `--no-dev` flag to avoid including unnecessary dependencies.
Does this package enforce PSR-12 or other coding standards?
The generated package includes Laravel Pint and PHPStan configurations by default, which enforce PSR-12 and other modern PHP standards. You can customize these in the template or post-generation.
How can I integrate this into a CI/CD pipeline for package validation?
Add a GitHub Action or pre-commit hook to validate the package structure. For example, create a workflow that runs `php artisan package:validate YourPackage` to ensure consistency before merging.
What if I need a package structure that deviates from Laravel conventions?
You can extend the default templates or create custom ones. For example, add a `--namespace` flag to override default namespaces or use post-generation scripts to modify files as needed.
Are there alternatives to this package for scaffolding Laravel packages?
Yes, alternatives include manually creating the structure or using tools like `laravel/new` for basic scaffolding. However, **backtheweb/laravel-package-maker** is tailored specifically for reusable Laravel packages with built-in conventions, testing, and tooling support.
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.
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo