$this->select, 'thirdid' => $this->thirdId, ]); $response = $service->documentList($params); $this->data = $response['data'] ?? []; $this->metadata = $response['metadata'] ?? null; $this->errorMessage = $response['error'] ?? null; } catch (\Throwable $e) { $this->errorMessage = $e->getMessage(); $this->data = []; } } public function getDocumentDetail(): void { if (blank($this->detailJnl) || blank($this->detailNumber)) { return; } try { $service = app(LogisticsService::class); $response = $service->documentDetail($this->detailJnl, $this->detailNumber); $this->detailData = $response['data'] ?? []; $this->errorMessage = $response['error'] ?? null; } catch (\Throwable $e) { $this->errorMessage = $e->getMessage(); $this->detailData = []; } } }