{"record":{"id":"0e64cc8a7fdc737a","repo":"filamentphp/filament","slug":"constraint-of-class-constraintclass-must-have-a","errorCode":null,"errorMessage":"Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method.","messagePattern":"Constraint of class \\[\\$constraintClass\\] must have a unique name, passed to the \\[make\\(\\)\\] method\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/query-builder/src/Constraints/Constraint.php","lineNumber":67,"sourceCode":"\n    /**\n     * @var ?class-string<Model>\n     */\n    protected ?string $model = null;\n\n    final public function __construct(string $name)\n    {\n        $this->name($name);\n    }\n\n    public static function make(?string $name = null): static\n    {\n        $constraintClass = static::class;\n\n        $name ??= static::getDefaultName();\n\n        if (blank($name)) {\n            throw new LogicException(\"Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method.\");\n        }\n\n        $static = app($constraintClass, ['name' => $name]);\n        $static->configure();\n\n        return $static;\n    }\n\n    public static function getDefaultName(): ?string\n    {\n        return null;\n    }\n\n    public function getBuilderBlock(): Block\n    {\n        return Block::make($this->getName())\n            ->label($this->getLabel())\n            ->icon($this->getIcon())","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/query-builder/src/Constraints/Constraint.php#L49-L85","documentation":"Error \"Constraint of class [$constraintClass] must have a unique name, passed to the [make()] method.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/query-builder/src/Constraints/Constraint.php:67 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"}