Download the PHP package cleaniquecoders/laravel-config-webhook without Composer
On this page you can find all versions of the php package cleaniquecoders/laravel-config-webhook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cleaniquecoders/laravel-config-webhook
More information about cleaniquecoders/laravel-config-webhook
Files in cleaniquecoders/laravel-config-webhook
Package laravel-config-webhook
Short Description Define, sign, dispatch and log outgoing webhooks in Laravel with retries, HMAC signatures, and an optional Livewire + Flux admin UI.
License MIT
Homepage https://github.com/cleaniquecoders/laravel-config-webhook
Informations about the package laravel-config-webhook
Laravel Config Webhook
Define, sign, dispatch and log outgoing webhooks in any Laravel app. Subscribers register a URL, a secret, and the event types they care about; when one of those events fires, the package delivers an HMAC-signed JSON payload with automatic retries and exponential backoff, and records every attempt in a delivery log. Ships with an optional Livewire + Flux admin UI.
The package is completely app-agnostic β it knows nothing about your domain. You register your own event catalogue (via config or at runtime) and either dispatch payloads manually or map your domain events to webhook types.
Features
- π Outgoing webhooks β per-subscriber URL, secret, subscribed events, custom headers
- π HMAC-SHA256 signatures β every request is signed; helpers to verify incoming ones too
- π Retries with exponential backoff β configurable base/multiplier, full delivery log
- π§Ύ Delivery logs β status, HTTP code, response time, attempt, error, response body
- π§© Config- or runtime-driven event catalogue β no hardcoded domain events
- π₯οΈ Optional Livewire + Flux admin UI β works headless without it
- π Secrets encrypted at rest, configurable authorization gate, configurable user model
- β Laravel 12 & 13, PHP 8.3+
Requirements
- PHP 8.3+
- Laravel 12 or 13
- (Optional, for the admin UI)
livewire/livewire^3 || ^4 andlivewire/flux
Installation
The service provider and ConfigWebhook facade are auto-discovered β no manual
registration needed.
Publish and run the migrations:
Publish the config:
Optionally publish the views (to customise the Flux UI):
The optional admin UI requires
livewire/livewireandlivewire/flux. The service, job, and signing all work without them.
Configuration
Register the event types your app can emit, either in config/config-webhook.php:
β¦or at runtime (e.g. in a service provider's boot()):
Usage
1. Dispatch a payload manually
Fan a payload out to every active webhook subscribed to the event type:
The receiver gets:
2. Map a domain event (auto-dispatch)
Wire a domain event to a webhook type once and the package dispatches automatically whenever the event fires:
3. Verifying signatures on the receiving side
Admin UI
Enable the bundled full-page route in config/config-webhook.php:
Or drop the Livewire component anywhere in your own layout:
Restrict access with a gate:
Pruning logs
How it works
| Concern | Class |
|---|---|
| Manager (facade root) | ConfigWebhook β registerEvent(s), listen, send, dispatchFromEvent |
| Models | Models\Webhook, Models\WebhookDeliveryLog (package Concerns\HasUuid) |
| Status | Enums\DeliveryStatus β PENDING, SUCCESS, FAILED, RETRYING |
| Delivery | Jobs\SendWebhookEvent (queued, retry + backoff) |
| Signing | Support\WebhookSignature β generate / verify |
| Events | Events\WebhookDelivered, Events\WebhookFailed |
| CLI | Commands\PruneWebhookDeliveryLogsCommand |
| UI | Livewire\Webhooks + resources/views/livewire/webhooks.blade.php (Flux, optional) |
Testing
The suite includes a true end-to-end test (tests/EndToEndTest.php) that mirrors how a
consuming app uses the package: a domain event is mapped with ConfigWebhook::listen(), a
subscriber webhook is created, the event is fired, and the queued job runs on the sync
queue to deliver a signed HTTP request β asserting both the outgoing request and the
recorded delivery log.
Local development (try it in a real app)
The package ships an Orchestra Testbench Workbench
setup (testbench.yaml + workbench/) β a real Laravel app, pre-seeded so it works
end-to-end out of the box:
Then exercise the full pipeline:
GET /webhooksβ the bundled Livewire admin UI (needslivewire/fluxinstalled to render)GET /fireβ dispatches the sampleOrderShippeddomain eventGET /receivedβ the in-app subscriber endpoint shows the signed payload it received ("verified": true), and the delivery log in the UI showsstatus=success, http=200
workbench/app/Providers/WorkbenchServiceProvider.php shows exactly how a host app registers
its event catalogue and maps a domain event to a webhook type;
workbench/routes/web.php includes a /receiver endpoint that verifies the HMAC signature.
The demo delivers on a
databasequeue, so aqueue:workworker must be running. In your own app you can deliver synchronously by setting the queue connection tosync.
Documentation
Full documentation lives in docs/:
- Architecture β how it works, components, delivery lifecycle
- Development β getting started, usage, testing, workbench
- Configuration β every config key
- API Reference β manager, signatures, payload & headers
- Releasing β versioning and publishing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Nasrul Hazim Bin Mohamad
- All Contributors
This package was extracted and generalised from the G8Stack webhook integrations feature.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-config-webhook with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^12.0||^13.0