*/ public array $backoff = [5, 10]; public function __construct( public WebhookLog $log, ) {} /** * @return array */ public function broadcastOn(): array { return [ new PrivateChannel("webhook.{$this->log->webhook_id}.logs"), ]; } public function broadcastAs(): string { return 'webhook.log.updated'; } public function broadcastQueue(): string { return 'broadcasts'; } /** * @return array */ public function broadcastWith(): array { return [ 'id' => $this->log->id, 'event_type' => $this->log->event_type, 'payload' => $this->log->payload, 'response_status' => $this->log->response_status, 'response_body' => $this->log->response_body, 'delivered_at' => $this->log->delivered_at?->toIso8601String(), 'failed_at' => $this->log->failed_at?->toIso8601String(), 'attempts' => $this->log->attempts, 'created_at' => $this->log->created_at->toIso8601String(), ]; } }