mpociot/captainhook
CaptainHook makes it easy to add webhooks to your Laravel application: map Eloquent model events such as created, updated, and deleted to outgoing HTTP requests, so external services are notified automatically whenever your data changes.
Build vs. buy vs. adopt for outbound webhooks. This package is not a platform; it's a reference implementation of one pattern — an event-to-subscriber-URL map, a model trait, and a queued HTTP POST. That makes the "do we even need this?" question cheap to answer. A customer-visible v0 can sit in front of design partners in days, and adoption data — not opinion — drives what comes next.
Demand validation for integrations. If Sales and Support keep hearing "can we get order/invoice/user events pushed into our CRM, warehouse, Zapier, or n8n," ship a thin version behind a flag and instrument it. The metrics that decide the roadmap: how many accounts register an endpoint, which event types they subscribe to, and what percentage of deliveries succeed. That data justifies — or kills — the real investment.
Event taxonomy as a public contract. This is the product work the package does not do, and it's the work that's expensive to get wrong later. Whether created alone, or also updated/deleted/domain events, become customer-facing API is a permanent decision. Prototyping on a throwaway implementation forces that conversation now, while it's cheap.
Pricing and packaging. Webhooks are frequently a paid-tier or "Enterprise integrations" lever. A cheap pilot tells you whether customers value event push enough to pay for reliability (retries, replay, delivery logs) versus merely wanting "it exists."
Roadmap sequencing for platform work. A durable webhook system — signing, retries with backoff, dead-lettering, replay, per-endpoint filtering, rate limits, self-service endpoint UI — is weeks of engineering, and the endpoint UI is usually the bulk of it. The pilot gives a defensible order: prove demand → invest in delivery guarantees → invest in developer self-service.
Prototype and partnership use cases. Internal tools, design-partner betas, fan-out to a handful of first-party endpoints, workflow triggers where delivery is not yet contractual. Good enough for a beta; not for a customer SLA.
Architecture reference for an in-house build. Even if the dependency never ships, the source is a readable template for "model event → queued job → signed HTTP callback," and a legitimate input to an internal estimate.
One decision that must come first: don't scope on unverified inputs. The supplied material contradicts itself — the repo tagline says "add webhooks to your Laravel app," while the package description describes a Git hook manager installing scripts into .git/hooks. Those are different products with different users and different risk profiles. The first PM action is to have an engineer confirm which one is in the repo (composer.json, src/, README) before a single line of a roadmap depends on it. An hour of verification beats a sprint spent on the wrong problem.
Worth a time-boxed spike when:
Reject it, or look elsewhere, when:
husky-style alternatives, not against a webhook platform. Either way, an unmaintained dependency executing shell commands built from config needs a security read before it goes near anything user-influenced.To executives: We can test whether customers actually want event-driven integrations for roughly one engineer-week instead of a multi-week platform build. Webhooks are a common paid-tier and enterprise-integration lever, so the pilot answers a pricing question as well as a product one. The catch, stated plainly: the library itself is unmaintained (last release 2016, no dependents) and must be treated as a prototype or a reference design, not a foundation we build a customer SLA on. We are buying information, not infrastructure. The decision this unlocks is whether to fund a real, durable webhook platform — with signing, retries, replay, and self-service — and the pilot data will tell us.
To engineering: Treat this as ~200 lines of readable code you'll own, not a dependency you'll maintain. Fork or vendor it, pin it, and expect to patch it — assume no security fixes and no upstream triage. Use it to get the shape right (model event → queued job → HTTP POST → delivery record), then replace it if the product decision is "ship for real." Two non-negotiables if we go ahead: never test against the sync queue driver, and log every delivery attempt — without a delivery log we cannot answer a customer's "we didn't get the event" ticket. Also, before any of this, resolve the documentation conflict about what the package actually is; the README and the description disagree, and the source is the only trustworthy source here.
How can I help you explore Laravel packages today?