PHPackages                             cleaniquecoders/laravel-config-webhook - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. cleaniquecoders/laravel-config-webhook

ActiveLibrary[HTTP &amp; Networking](/categories/http)

cleaniquecoders/laravel-config-webhook
======================================

Define, sign, dispatch and log outgoing webhooks in Laravel with retries, HMAC signatures, and an optional Livewire + Flux admin UI.

1.0.0(yesterday)00MITPHPPHP ^8.3CI failing

Since Jun 8Pushed yesterdayCompare

[ Source](https://github.com/cleaniquecoders/laravel-config-webhook)[ Packagist](https://packagist.org/packages/cleaniquecoders/laravel-config-webhook)[ Docs](https://github.com/cleaniquecoders/laravel-config-webhook)[ GitHub Sponsors]()[ RSS](/packages/cleaniquecoders-laravel-config-webhook/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (14)Versions (2)Used By (0)

Laravel Config Webhook
======================

[](#laravel-config-webhook)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6826397ea7e82ab9933fbfd8a2d7ab38afa77c1d340997294ed6b8532fb1266b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c65616e69717565636f646572732f6c61726176656c2d636f6e6669672d776562686f6f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/laravel-config-webhook)[![GitHub Tests Action Status](https://camo.githubusercontent.com/71b55a5510b3b0271fc8ffdfcae52a8ba1810a8bfc0777905ee537eb3a182d57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636c65616e69717565636f646572732f6c61726176656c2d636f6e6669672d776562686f6f6b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/cleaniquecoders/laravel-config-webhook/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5de01129f3c4fc5e17111b0d004316fd9df8baf1c4ed4fbdde6bd8d3e2314c92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c65616e69717565636f646572732f6c61726176656c2d636f6e6669672d776562686f6f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cleaniquecoders/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](https://fluxui.dev) 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
--------

[](#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 &amp; 13**, PHP 8.3+

Requirements
------------

[](#requirements)

- PHP **8.3+**
- Laravel **12** or **13**
- (Optional, for the admin UI) `livewire/livewire` **^3 || ^4** and `livewire/flux`

Installation
------------

[](#installation)

```
composer require cleaniquecoders/laravel-config-webhook
```

The service provider and `ConfigWebhook` facade are auto-discovered — no manual registration needed.

Publish and run the migrations:

```
php artisan vendor:publish --tag="laravel-config-webhook-migrations"
php artisan migrate
```

Publish the config:

```
php artisan vendor:publish --tag="laravel-config-webhook-config"
```

Optionally publish the views (to customise the Flux UI):

```
php artisan vendor:publish --tag="laravel-config-webhook-views"
```

> The optional admin UI requires `livewire/livewire` and `livewire/flux`. The service, job, and signing all work without them.

Configuration
-------------

[](#configuration)

Register the event types your app can emit, either in `config/config-webhook.php`:

```
'events' => [
    'order.created'   => 'Order Created',
    'order.cancelled' => 'Order Cancelled',
    'user.registered' => 'User Registered',
],
```

…or at runtime (e.g. in a service provider's `boot()`):

```
use CleaniqueCoders\ConfigWebhook\Facades\ConfigWebhook;

ConfigWebhook::registerEvents([
    'order.created' => 'Order Created',
    'user.registered' => 'User Registered',
]);
```

Usage
-----

[](#usage)

### 1. Dispatch a payload manually

[](#1-dispatch-a-payload-manually)

Fan a payload out to every active webhook subscribed to the event type:

```
use CleaniqueCoders\ConfigWebhook\Facades\ConfigWebhook;

ConfigWebhook::send('order.created', [
    'id' => $order->id,
    'total' => $order->total,
]);
```

The receiver gets:

```
// POST https://subscriber.example.com/hook
// Headers: X-Webhook-Signature, X-Webhook-Event, X-Webhook-Delivery
{
    "event": "order.created",
    "timestamp": "2026-06-08T12:00:00+00:00",
    "data": { "id": 123, "total": 49.90 }
}
```

### 2. Map a domain event (auto-dispatch)

[](#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:

```
use App\Events\OrderCreated;
use CleaniqueCoders\ConfigWebhook\Facades\ConfigWebhook;

ConfigWebhook::listen(
    OrderCreated::class,
    'order.created',
    fn (OrderCreated $event) => [
        'id' => $event->order->id,
        'total' => $event->order->total,
    ],
);
```

### 3. Verifying signatures on the receiving side

[](#3-verifying-signatures-on-the-receiving-side)

```
use CleaniqueCoders\ConfigWebhook\Support\WebhookSignature;

$valid = WebhookSignature::verify(
    payload: $request->getContent(),
    signature: $request->header('X-Webhook-Signature'),
    secret: $sharedSecret,
);
```

### Admin UI

[](#admin-ui)

Enable the bundled full-page route in `config/config-webhook.php`:

```
'route' => [
    'enabled' => true,
    'prefix' => 'admin/webhooks',
    'name' => 'config-webhook.index',
    'middleware' => ['web', 'auth'],
],
```

Or drop the Livewire component anywhere in your own layout:

```

```

Restrict access with a gate:

```
'gate' => 'manage-webhooks', // ability string, or a fn ($user) => bool
```

### Pruning logs

[](#pruning-logs)

```
php artisan config-webhook:prune --days=30
```

How it works
------------

[](#how-it-works)

ConcernClassManager (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
-------

[](#testing)

```
composer test
```

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)
----------------------------------------

[](#local-development-try-it-in-a-real-app)

The package ships an [Orchestra Testbench **Workbench**](https://github.com/orchestral/testbench)setup (`testbench.yaml` + `workbench/`) so you can boot a real Laravel app around it:

```
composer install
vendor/bin/testbench workbench:build   # creates the sqlite db + runs migrations
vendor/bin/testbench serve             # http://127.0.0.1:8000
```

- `GET /webhooks` — the bundled Livewire admin UI (needs `livewire/flux` installed to render)
- `GET /fire` — dispatches the sample `OrderShipped` domain event through the full pipeline

`workbench/app/Providers/WorkbenchServiceProvider.php` shows exactly how a host app registers its event catalogue and maps a domain event to a webhook type.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Nasrul Hazim Bin Mohamad](https://github.com/nasrulhazim)
- [All Contributors](../../contributors)

This package was extracted and generalised from the G8Stack webhook integrations feature.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (4 commits)")

---

Tags

laravelCleanique Coderslaravel-config-webhook

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cleaniquecoders-laravel-config-webhook/health.svg)

```
[![Health](https://phpackages.com/badges/cleaniquecoders-laravel-config-webhook/health.svg)](https://phpackages.com/packages/cleaniquecoders-laravel-config-webhook)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M41](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k9.9M87](/packages/dedoc-scramble)[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[spatie/laravel-passkeys

Use passkeys in your Laravel app

463755.5k32](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[sunchayn/nimbus

A Laravel package providing an in-browser API client with automatic schema generation, live validation, and built-in authentication with a touch of Laravel-tailored magic for effortless API testing.

29737.0k](/packages/sunchayn-nimbus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
