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
Requires
- php: ^8.2
- atlas-php/core: ^0.3.0
- illuminate/support: ^10.0|^11.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.17
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.5
README
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
- Atlas Relay Model
- Receive Webhook Relay
- Send Webhook Relay
- Archiving & Logging
- Example Usage
- Full API Reference
- Install Guide
Contributing
See the Contributing Guide.
License
MIT — see LICENSE.