FilamentF
Filament2y ago
Luke

Is it possible to use a nested relationship in a RelationshipConstraint filter?

I'm trying to create a relationship constraint for a nested belongs to relationship, but it's ignoring .child in the relationship name. Is it not possible to use dot notation here?

QueryBuilder\Constraints\RelationshipConstraint::make('parent.child')
                        ->selectable(
                   QueryBuilder\Constraints\RelationshipConstraint\Operators\IsRelatedToOperator::make()
                                ->titleAttribute('name')
                                ->searchable()
                                ->multiple(),
                        ),
Was this page helpful?