{"record":{"id":"c364780a5503e5b7","repo":"filamentphp/filament","slug":"table-livewireclass-must-have-a-query-r","errorCode":null,"errorMessage":"Table [{$livewireClass}] must have a [query()], [relationship()], or [records()].","messagePattern":"Table \\[(.+?)\\] must have a \\[query\\(\\)\\], \\[relationship\\(\\)\\], or \\[records\\(\\)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/tables/src/Concerns/HasRecords.php","lineNumber":168,"sourceCode":"            $setRecordLocales = function (EloquentCollection | Paginator | CursorPaginator $records) use ($translatableContentDriver): EloquentCollection | Paginator | CursorPaginator {\n                $records->transform(fn (Model $record) => $translatableContentDriver->setRecordLocale($record));\n\n                return $records;\n            };\n        } else {\n            $setRecordLocales = fn (EloquentCollection | Paginator | CursorPaginator $records): EloquentCollection | Paginator | CursorPaginator => $records;\n        }\n\n        if ($this->cachedTableRecords) {\n            return $setRecordLocales($this->cachedTableRecords);\n        }\n\n        $query = $this->getFilteredSortedTableQuery();\n\n        if (! $query) {\n            $livewireClass = $this::class;\n\n            throw new LogicException(\"Table [{$livewireClass}] must have a [query()], [relationship()], or [records()].\");\n        }\n\n        if (\n            (! $this->getTable()->isPaginated()) ||\n            ($this->isTableReordering() && (! $this->getTable()->isPaginatedWhileReordering()))\n        ) {\n            return $setRecordLocales($this->cachedTableRecords = $this->hydratePivotRelationForTableRecords($query->get()));\n        }\n\n        return $setRecordLocales($this->cachedTableRecords = $this->hydratePivotRelationForTableRecords($this->paginateTableQuery($query)));\n    }\n\n    /**\n     * @return Model | array<string, mixed> | null\n     */\n    protected function resolveTableRecord(?string $key): Model | array | null\n    {\n        if ($key === null) {","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/tables/src/Concerns/HasRecords.php#L150-L186","documentation":"Error \"Table [{$livewireClass}] must have a [query()], [relationship()], or [records()].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/tables/src/Concerns/HasRecords.php:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}