Implement webhook inspector

This commit is contained in:
2026-08-04 17:09:39 +02:00
parent b021836c14
commit 75d8b25b64
57 changed files with 5110 additions and 230 deletions
@@ -0,0 +1,23 @@
<?php
namespace App\Actions;
use App\Models\WebhookEndpoint;
class CreateAnonymousEndpointAction
{
public function handle(): WebhookEndpoint
{
$token = WebhookEndpoint::generateToken();
return WebhookEndpoint::create([
'name' => 'Anonymous test endpoint',
'token' => $token,
'token_hash' => WebhookEndpoint::tokenHash($token),
'is_public' => true,
'expires_at' => now()->addDays((int) config('webhooks.anonymous_ttl_days', 7)),
'response_headers' => ['Content-Type' => 'application/json'],
'response_body' => '{}',
]);
}
}