| Methods |
public
|
children(): HasMany
One-to-many relation to the children nodes.
One-to-many relation to the children nodes.
|
#
|
public
|
descendants(): BelongsToManyThroughClosures<static::class, $this, Pivot>
Many-to-many relation to the descendants through the closure table.
Many-to-many relation to the descendants through the closure table.
|
#
|
public
|
descendingClosures(): HasMany<Closure, $this>
One-to-many relationships to the descending closures.
One-to-many relationships to the descending closures.
|
#
|
public
|
scopeWithDescendants(Builder $query, int|null $depth = null, callable|null $constraints = null): void
|
#
|
public
|
scopeWithHeight(Builder $query, string $as = 'height'): void
|
#
|
public
|
scopeWhereIsLeaf(Builder $query, bool $bool = true): void
Deprecated
Use ->onlyLeaves() instead
|
#
|
public
|
scopeOnlyLeaves(Builder $query): void
|
#
|
public
|
scopeWithoutLeaves(Builder $query): void
|
#
|
public
|
scopeWhereHasChildren(Builder $query, bool $bool = true): void
|
#
|
public
|
scopeHasChildren(Builder $query, bool $bool = true): void
|
#
|
public
|
scopeWhereIsAncestorOf(Builder $query, mixed|Model $descendant, int|null $maxDepth = null, bool $withSelf = false): void
|
#
|
public
|
scopeAncestorsOf(Builder $query, mixed|Model $descendant, int|null $maxDepth = null, bool $withSelf = false): void
|
#
|
public
|
isLeaf(): bool
|
#
|
public
|
hasChildren(): bool
|
#
|
public
|
isParentOf(Model $node): bool
|
#
|
public
|
isAncestorOf(mixed|Model $node): bool
|
#
|
public
|
getSubtreeDepth(): int
|
#
|
public
|
getHeight(): int
Returns the depth of the subtree of which $this is a root.
Returns the depth of the subtree of which $this is a root.
|
#
|