{"record":{"id":"d8aa6fa421d58466","repo":"filamentphp/filament","slug":"a-configuration-with-the-key-resource-getkey","errorCode":null,"errorMessage":"A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}].","messagePattern":"A configuration with the key \\[(.+?)\\] has already been registered for the resource \\[(.+?)\\]\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/panels/src/Panel/Concerns/HasComponents.php","lineNumber":183,"sourceCode":"     */\n    public function resources(array $resources): static\n    {\n        $this->modelResources = [];\n\n        $hasCachedComponents = $this->hasCachedComponents();\n\n        foreach ($resources as $resource) {\n            if ($resource instanceof ResourceConfiguration) {\n                if (isset($this->resourceConfigurations[$resource->resource][$resource->getKey()])) {\n                    $message = \"A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}].\";\n\n                    if ($resource->getKey() === 'default') {\n                        $message .= ' Pass a unique key to each `::make()` call to register multiple configurations for the same resource.';\n                    } else {\n                        $message .= ' Each configuration for the same resource must have a unique key.';\n                    }\n\n                    throw new LogicException($message);\n                }\n\n                $this->resourceConfigurations[$resource->resource][$resource->getKey()] = $resource;\n\n                if (! $hasCachedComponents) {\n                    $this->registerToCluster($resource->resource);\n                }\n            } elseif (! $hasCachedComponents) {\n                $this->resources[] = $resource;\n\n                $this->registerToCluster($resource);\n            }\n        }\n\n        return $this;\n    }\n\n    /**","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/panels/src/Panel/Concerns/HasComponents.php#L165-L201","documentation":"Error \"A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}].\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/panels/src/Panel/Concerns/HasComponents.php:183 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"}