| Methods |
public
|
getClosureTable(): string
Return the name of the closure table.
Return the name of the closure table.
|
#
|
public
|
newClosureQuery(string|null $as = null): Builder
Instanciate a new query builder on the closure table,
optionally aliased.
Instanciate a new query builder on the closure table,
optionally aliased.
|
#
|
public
|
newClosure(Model $parent, array<string, mixed> $attributes, bool $exists, string|null $table = null): Closure
Create a new closure model instance.
Create a new closure model instance.
|
#
|
protected
|
belongsToManyThroughClosures<TRelatedModel is Model>(
class-string<TRelatedModel> $related,
string $table,
string $foreignPivotKey = 'descendant_id',
string $relatedPivotKey = 'ancestor_id',
string $relationName = 'ancestors',
): BelongsToManyThroughClosures<TRelatedModel, $this, Pivot>
Define a belongs-to-many-through-closures relationship.
Define a belongs-to-many-through-closures relationship.
|
#
|
protected
|
hasManyClosuresWith<TRelatedModel is Model>(
$class,
string $table,
string $foreignPivotKey = 'descendant_id',
string $relatedPivotKey = 'ancestor_id',
): HasMany<Closure, $this>
Define a one-to-many relationship to the closure table.
Define a one-to-many relationship to the closure table.
|
#
|
protected
|
scopeWithManyThroughClosures(
Builder $query,
string $relation,
int|null $depth = null,
callable|null $constraints = null,
): void
|
#
|
protected
|
scopeWhereHasClosuresWith(
Builder $query,
mixed|Model $related,
string $relation,
string $scope,
int|null $maxDepth = null,
bool $withSelf = false,
): void
|
#
|