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 Package Tools Laravel Package

spatie/laravel-package-tools

Laravel package helper from Spatie providing a base PackageServiceProvider to quickly register and publish config, migrations, routes, views, translations, assets, commands, install scripts, view components/composers, and shared view data with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Accelerates internal package development by reducing boilerplate code, avoiding reinventing the wheel for common Laravel package patterns (e.g., config, migrations, commands).
  • Roadmap Alignment: Enables faster iteration on reusable components (e.g., Blade/Inertia views, migrations) for cross-cutting features like analytics, notifications, or auth extensions.
  • Use Cases:
    • Internal Tooling: Standardize package structure for teams building Laravel-based microservices or shared libraries.
    • Marketplace Readiness: Streamline publishable assets (configs, migrations, assets) to meet Laravel ecosystem expectations (e.g., vendor:publish compatibility).
    • Developer Experience: Reduce onboarding friction for engineers adopting new packages by automating setup (e.g., InstallCommand with publishConfigFile() + publishMigrations()).

When to Consider This Package

  • Adopt if:
    • Your team is building reusable Laravel packages (e.g., domain-specific modules, utilities).
    • You need standardized publishable assets (configs, views, migrations) with minimal manual setup.
    • Your package requires Blade/Inertia components, artisan commands, or route registration with zero boilerplate.
    • You want to leverage Spatie’s package-skeleton for consistent directory structure and best practices.
  • Look elsewhere if:
    • You’re building a non-Laravel PHP package (e.g., Symfony, standalone CLI tools).
    • Your package is extremely simple (e.g., a single trait/class with no assets or migrations).
    • You need advanced package discovery (e.g., dynamic service provider registration beyond hasRoute()/hasMigration()).
    • Your team prefers manual control over all package registration logic (e.g., custom ServiceProvider inheritance).

How to Pitch It (Stakeholders)

For Executives: "This package cuts 80% of the boilerplate code needed to build and distribute Laravel packages internally. By standardizing how we register configs, migrations, and views, we’ll ship reusable components (e.g., for [Feature X]) 3x faster while ensuring consistency across teams. It’s like having a ‘Laravel package template’ that auto-handles vendor:publish, reducing support overhead for engineers adopting our tools."

For Engineering: *"Spatie’s laravel-package-tools lets us focus on business logic instead of reinventing package setup. Key wins:

  • One-liners to register routes, migrations, or Blade components (e.g., hasViewComponents('alert', Alert::class)).
  • Automated InstallCommand to publish configs/assets in one step (no more manual php artisan vendor:publish).
  • Opinionated structure that aligns with Laravel’s ecosystem (e.g., resources/dist/ for assets, database/migrations/ for DB changes). Example: To add a new package with migrations + configs, we’ll go from 50+ lines of setup to 5 lines of configurePackage() code."*

For PMs: *"This is a force multiplier for our Laravel-based product roadmap. Use cases:

  1. Cross-cutting features: Build a ‘Notifications’ package once, reuse it in 3 products.
  2. Internal APIs: Standardize how teams expose Laravel endpoints (e.g., hasRoute('api')).
  3. Marketplace packages: If we ever sell tools, this ensures they’re ‘pro-level’ with publishable assets and docs. Tradeoff: Minimal learning curve (uses Laravel’s native patterns) but requires adopting Spatie’s directory conventions."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport