sammyjo20/laravel-haystack
Laravel Haystack lets you run queued jobs as a database-backed, ordered stack instead of a simple chain. Add jobs before or during execution, pass data between them, apply delays, and manage long-running workflows with persistent, resilient, resumable execution in Laravel.
Bus::chain() (in-memory, lost on restart) and heavyweight orchestrators (Temporal, AWS Step Functions, Laravel Workflow). For teams on Laravel 10/11 with existing queue infrastructure, adopting this package is usually 1–3 days of work versus weeks to build equivalent durability and retry semantics.then/catch/finally callbacks, this package makes those one-sprint items rather than a platform initiative.Adopt when:
queue:restart; native Bus::chain() losing progress is a real, observed failure mode.then / catch / finally hooks appended at dispatch time for completion notifications, cleanup, or audit logging.Look elsewhere when:
For executives: This is a small, free, open-source package that removes a meaningful chunk of custom engineering from any feature involving multi-step background work. It makes long-running workflows durable across deploys and crashes, which directly reduces "half-finished process" incidents that generate support tickets and manual clean-up. No vendor lock-in and no new infrastructure — it stores state in the database you already run. Cost is measured in engineering days, not licences.
For engineering: Opt-in via a trait on jobs you already write; it wraps the existing queue connection and adds haystacks / haystack_jobs tables. You get persistent chains, per-job delays, data passing between jobs, and dispatch-time then/catch/finally hooks. v2.2.0 is a reliability fix: a failed job no longer deletes its haystack, so failed chains remain inspectable and recoverable — check any cleanup jobs or dashboards that assumed the record disappeared on failure, and confirm retention/pruning is in place before scaling usage. Risks are the usual OSS ones: single maintainer, schema you now own, and table growth. Mitigations are cheap — pin the version, add a scheduled prune, and keep the integration behind a thin internal abstraction so it can be swapped.
How can I help you explore Laravel packages today?