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
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace App\Models;
use Database\Factories\WebhookRequestFactory;
use Illuminate\Database\Eloquent\Concerns\HasUlids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class WebhookRequest extends Model
{
/** @use HasFactory<WebhookRequestFactory> */
use HasFactory, HasUlids;
protected $fillable = [
'webhook_endpoint_id',
'method',
'request_uri',
'headers',
'query_parameters',
'body',
'json_payload',
'content_type',
'body_size',
'ip_address',
'user_agent',
'received_at',
];
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'headers' => 'encrypted:array',
'query_parameters' => 'encrypted:array',
'body' => 'encrypted',
'json_payload' => 'encrypted:array',
'body_size' => 'integer',
'received_at' => 'datetime',
];
}
public function endpoint(): BelongsTo
{
return $this->belongsTo(WebhookEndpoint::class, 'webhook_endpoint_id');
}
}