atlas-php/relay

Unified Laravel relay lifecycle for capturing and delivering payloads.

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/atlas-php/relay

v0.14.1 2025-11-19 20:14 UTC

This package is auto-updated.

Last update: 2025-11-20 19:06:36 UTC


README

Build coverage License

Atlas Relay is a Laravel package providing a unified, reliable system for receiving webhooks, processing actions, and sending outbound HTTP requests — all with full lifecycle tracking and auditability.

Table of Contents

Overview

Atlas Relay simplifies webhook and payload handling by ensuring every inbound and outbound request is captured, validated, executed, and recorded. It removes the fragility of ad‑hoc webhook handling and replaces it with a consistent, observable pipeline.

Installation

composer require atlas-php/relay

For publishing config, migrations, and scheduler setup: Install Guide

Receive Webhooks

Custom handler:

Relay::request($request)
    ->handler(fn ($payload) => $this->handleEvent($payload));

Async job instead of handler:

Relay::request($request)->dispatch(new ExampleJob);

With guard:

Relay::request($request)
    ->guard(StripeGuard::class)
    ->handler(fn ($payload) => $this->handleEvent($payload));

Relay providers can supply a guard + handler: (recommended)

Relay::request($request)
    ->provider(MyWebhookProvider::class)
    ->handler();

See controller example with guard and response

More inbound examples: Receive Webhook Relay

Send Webhooks

Relay::http()->post('https://api.example.com/webhooks', [
    'event' => 'order.created',
]);

With provider, group, headers, retries, and timeout:

Relay::provider('stripe')
    ->setGroupId(42)
    ->http()
    ->withHeaders(['X-API-KEY' => '123'])
    ->retry(3, 500)
    ->timeout(10)
    ->post('https://partner.com/ingest', $payload);

Tip: setGroupId() scopes relays to your tenant/account identifiers. The value is stored as an unsigned big integer and left entirely to the consumer to interpret.

More outbound examples: Send Webhook Relay

Also See

Contributing

See the Contributing Guide.

License

MIT — see LICENSE.