stancl/jobpipeline
Turn any series of Laravel jobs into an event listener. Build pipelines that pull data from events, run jobs sequentially, and choose sync or queued execution (with optional queue name). Ideal for workflows like tenant setup, migrations, and seeding.
dispatch() or HandleJobsMiddleware.Artisan commands with event-triggered job pipelines (e.g., "after user signup, generate reports").Adopt when:
Look elsewhere if:
For Executives: "JobPipeline lets us automate complex, multi-step processes—like setting up new tenants or processing orders—by chaining asynchronous jobs into reusable workflows. Instead of writing custom code to dispatch jobs in sequence, we can define a pipeline once and trigger it via events. This reduces development time, improves reliability (with built-in error handling), and scales effortlessly by leveraging Laravel’s queue system. It’s a lightweight, low-risk solution (MIT license, active maintenance) that aligns with our event-driven architecture, enabling faster feature delivery without adding technical debt."
Key Benefits:
For Engineers:
*"JobPipeline turns job sequences into event listeners. Need to run JobA → JobB → JobC when EventX fires? Just do this:
Event::listen(TenantCreated::class, JobPipeline::make([
CreateDatabase::class,
MigrateDatabase::class,
SeedDatabase::class,
])->send(fn ($event) => $event->tenant)->shouldBeQueued());
Why use it?
dispatch() calls in event handlers.false from a job to cancel the rest of the pipeline.When to avoid it:
Perfect for:
Artisan commands with event-triggered jobs."*For Product Managers: *"This package helps us deliver features faster by automating workflows without adding complexity. For example:
TenantCreated handler, define a pipeline once and reuse it.Impact:
dispatch() calls or race conditions.How can I help you explore Laravel packages today?