filamentphp/filament · error · LogicException
Constraint of class [$constraintClass] must have a unique na
Error message
Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method.
What it means
Error "Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method." thrown in filamentphp/filament.
Source
Thrown at packages/query-builder/src/Constraints/Constraint.php:67
/**
* @var ?class-string<Model>
*/
protected ?string $model = null;
final public function __construct(string $name)
{
$this->name($name);
}
public static function make(?string $name = null): static
{
$constraintClass = static::class;
$name ??= static::getDefaultName();
if (blank($name)) {
throw new LogicException("Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method.");
}
$static = app($constraintClass, ['name' => $name]);
$static->configure();
return $static;
}
public static function getDefaultName(): ?string
{
return null;
}
public function getBuilderBlock(): Block
{
return Block::make($this->getName())
->label($this->getLabel())
->icon($this->getIcon())View on GitHub (pinned to 53483fa934)
When it happens
Trigger: Thrown at packages/query-builder/src/Constraints/Constraint.php:67 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/0e64cc8a7fdc737a.
Report an issue: GitHub.