panelis-php / webhook
Generic webhook manager for Panelis CMS.
v0.1.0
2026-06-24 04:35 UTC
Requires
- php: ^8.3
- filament/filament: ^5.0
- illuminate/http: ^13.0
- illuminate/routing: ^13.0
- illuminate/support: ^13.0
Requires (Dev)
- laravel/pint: ^1.29
This package is auto-updated.
Last update: 2026-06-24 12:20:17 UTC
README
A webhook manager for Laravel and Panelis applications.
Features
- Register webhook vendors through configuration
- Generic webhook handlers
- Automatic route registration
- Optional webhook logging
- Queue-based logging
- Composer-based Panelis plugin discovery
Requirements
- PHP 8.3+
- Laravel 13+
- Filament 5+
Installation
Install the package via Composer:
composer require panelis-php/webhook
Publish the configuration file:
php artisan vendor:publish --tag=webhook-config
Publish the database migrations:
php artisan vendor:publish --tag=webhook-migrations
Run migrations:
php artisan migrate
Configuration
Configure your webhook vendors in config/webhook.php:
return [ 'prefix' => 'webhook', 'vendors' => [ 'ping' => [ 'handler' => App\Webhook\PingWebhook::class, ], ], ];
This configuration automatically registers:
POST /webhook/ping
Creating a Handler
Create a webhook handler that implements the Webhook contract:
<?php namespace App\Webhook; use Illuminate\Http\Request; use Panelis\Webhook\Contracts\Webhook; class PingWebhook implements Webhook { public function validate(Request $request): void { // } public function handle(Request $request): mixed { return response()->json([ 'message' => 'pong', ]); } }
Logging
Webhook requests can be stored by enabling logging for a vendor:
'vendors' => [ 'ping' => [ 'handler' => App\Webhook\PingWebhook::class, 'store' => true, ], ],
Logged requests are stored in the webhook_logs table.
Available fields:
- ulid
- vendor
- event
- status
- payload
- metadata
- exception
- processed_at
Example
Send a test request:
curl -X POST \
http://localhost/webhook/ping \
-H "Content-Type: application/json" \
-d '{"hello":"world"}'
Response:
{
"message": "pong"
}
Roadmap
- Filament Resource
- Webhook details page
- Retry failed webhooks
- Replay webhook payloads
- Dashboard widgets
- Failed webhook notifications
License
The MIT License (MIT).