$run->id, 'kind' => $kind], ['host_id' => $host?->id, 'external_id' => $externalId], ); } protected function hasResource(ProvisioningRun $run, string $kind): bool { return RunResource::query()->where('run_id', $run->id)->where('kind', $kind)->exists(); } }