where('workspace_id', $workspace->id) ->find($id); if (! $webhook instanceof Webhook) { return Response::error('Webhook not found.'); } return $webhook; } protected function webhookLogFor(Webhook $webhook, mixed $id): WebhookLog|Response|ResponseFactory { $log = $webhook->logs()->find($id); if (! $log instanceof WebhookLog) { return Response::error('Webhook log not found.'); } return $log; } }