Open
Description
I migrated from laravel-adjacency-list due to the read-performance benefits. However, I am missing some relations, especially the siblings()
relationship.
I know I can simply get the siblings, but I need to get them in a whereHas()
relation.
For now, I am using both packages at the same time, which really isn't ideal and also only works, because they both offer a siblings()
method:
use NodeTrait, HasAdjacencyList {
NodeTrait::descendants insteadof HasAdjacencyList;
NodeTrait::parent insteadof HasAdjacencyList;
NodeTrait::ancestors insteadof HasAdjacencyList;
NodeTrait::children insteadof HasAdjacencyList;
NodeTrait::newCollection insteadof HasAdjacencyList;
NodeTrait::newEloquentBuilder insteadof HasAdjacencyList;
NodeTrait::isChildOf insteadof HasAdjacencyList;
HasAdjacencyList::siblings insteadof NodeTrait;
HasAdjacencyList::siblingsAndSelf insteadof NodeTrait;
}
I tried to implement the siblings() relationship myself, but I didn't manage to do it. Maybe someone else with more experience can charm in. Would be highly appreciated!
Metadata
Metadata
Assignees
Labels
No labels