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.
vendor:publish compatibility).InstallCommand with publishConfigFile() + publishMigrations()).hasRoute()/hasMigration()).ServiceProvider inheritance).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:
hasViewComponents('alert', Alert::class)).InstallCommand to publish configs/assets in one step (no more manual php artisan vendor:publish).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:
hasRoute('api')).How can I help you explore Laravel packages today?