filamentphp/filament · error · LogicException

A configuration with the key [{$resource->getKey()}] has alr

Error message

A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}].

What it means

Error "A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}]." thrown in filamentphp/filament.

Source

Thrown at packages/panels/src/Panel/Concerns/HasComponents.php:183

     */
    public function resources(array $resources): static
    {
        $this->modelResources = [];

        $hasCachedComponents = $this->hasCachedComponents();

        foreach ($resources as $resource) {
            if ($resource instanceof ResourceConfiguration) {
                if (isset($this->resourceConfigurations[$resource->resource][$resource->getKey()])) {
                    $message = "A configuration with the key [{$resource->getKey()}] has already been registered for the resource [{$resource->resource}].";

                    if ($resource->getKey() === 'default') {
                        $message .= ' Pass a unique key to each `::make()` call to register multiple configurations for the same resource.';
                    } else {
                        $message .= ' Each configuration for the same resource must have a unique key.';
                    }

                    throw new LogicException($message);
                }

                $this->resourceConfigurations[$resource->resource][$resource->getKey()] = $resource;

                if (! $hasCachedComponents) {
                    $this->registerToCluster($resource->resource);
                }
            } elseif (! $hasCachedComponents) {
                $this->resources[] = $resource;

                $this->registerToCluster($resource);
            }
        }

        return $this;
    }

    /**

View on GitHub (pinned to 53483fa934)

When it happens

Trigger: Thrown at packages/panels/src/Panel/Concerns/HasComponents.php:183 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of filamentphp/filament@53483fa934 (2026-08-17). Data as JSON: /api/errors/d8aa6fa421d58466. Report an issue: GitHub.