Weave Code
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 Packager

Laravel Packager Laravel Package

jeroen-g/laravel-packager

View on GitHub
Deep Wiki
Context7

A cli tool for creating Laravel packages

Frequently asked questions about Laravel Packager
How do I install and run laravel-packager to create a new Laravel package?
Run `composer global require jeroen-g/laravel-packager` to install the CLI tool globally. Then generate a package with `laravel-package create vendor/package-name --template=default`. Ensure your Composer home directory is in your PATH for global commands to work.
Does this tool support custom package templates (e.g., API-only or auth extensions)?
Yes, the package includes template support. Use `--template=custom` to apply your own skeleton. Templates should follow Laravel’s PSR-4 and PSR-12 standards. You can also create reusable templates by extending the default structure in the tool’s configuration.
Will laravel-packager work with Laravel 11 when it releases? Or is it tied to Laravel 10?
The package is designed for Laravel 10+ and should support future versions, but check the release notes for updates. If Laravel 11 introduces breaking changes (e.g., package:discover updates), the tool will likely adapt. Monitor the GitHub repo for compatibility patches.
Can I use this for packages that need dynamic namespace handling (e.g., multi-tenant apps)?
Dynamic namespaces are supported but require manual configuration. Ensure your `autoload.psr-4` in `composer.json` aligns with your package’s namespace. For multi-tenant setups, extend the template to include conditional logic for namespace resolution during package registration.
How does laravel-packager handle Facade conflicts if my package uses the same class name as another?
The tool auto-generates Facade aliases in `config/app.php` but warns if conflicts exist. Resolve manually by editing the `aliases` array or renaming your Facade class. Always test with `composer why-not` to catch dependency issues early.
Is this tool compatible with Laravel Forge or Vapor for deploying packages as microservices?
Yes, the generated packages are Forge/Vapor-ready. Use multi-stage Docker builds to bake package scaffolding into your deployment images. Ensure your `composer.json` scripts (e.g., `post-install-cmd`) include package discovery commands if needed.
What’s the best way to integrate this into CI/CD (e.g., GitHub Actions) for automated package generation?
Add the CLI to your `composer.json` scripts under `post-create-project-cmd` or use a dedicated script in your workflow. Example: `composer global require jeroen-g/laravel-packager && laravel-package create vendor/package --template=api`. Test in a headless environment first.
Are there alternatives to laravel-packager for Laravel package development?
Yes, alternatives include `laravel/new` (basic scaffolding) or manual setup with `composer create-project --stability=dev`. However, laravel-packager offers deeper customization (templates, PSR-4 compliance) and Laravel-specific optimizations like Facade and Service Provider auto-registration.
How do I handle legacy Laravel packages (<8.0) that need migration to this tool?
For Laravel <8.0, manually adjust the generated `composer.json` to drop unsupported features (e.g., PHP 8.1+ syntax). Use polyfills if needed, but prioritize migrating to Laravel 10+ for full compatibility. Test incrementally with `composer validate` after generation.
Does laravel-packager support publishing assets (views, configs) like Laravel’s `publishes` array?
Yes, the tool includes support for the `publishes` array in `composer.json`. Generated packages will have placeholder entries for views, configs, and migrations. Customize the template to add your asset paths or use the `--publish` flag during creation.
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle