Methods |
public
|
__construct(
Builder $query,
Model $parent,
string $name,
string $table,
string $foreignPivotKey,
string $relatedPivotKey,
string $parentKey,
string $relatedKey,
string|null $relationName = null,
bool $inverse = false,
): void
Create a new morph to many relationship instance.
Create a new morph to many relationship instance.
Overrides
|
#
|
public
|
addEagerConstraints(array $models): void
Set the constraints for an eager load of the relation.
Set the constraints for an eager load of the relation.
Overrides
|
#
|
public
|
getRelationExistenceQuery(Builder $query, Builder $parentQuery, array|mixed $columns = ['*']): Builder
Add the constraints for a relationship count query.
Add the constraints for a relationship count query.
Overrides
|
#
|
public
|
newPivotQuery(): Builder
Create a new query builder for the pivot table.
Create a new query builder for the pivot table.
|
#
|
public
|
newPivot(array $attributes = [], bool $exists = false): Pivot
Create a new pivot model instance.
Create a new pivot model instance.
|
#
|
public
|
getMorphType(): string
Get the foreign key "type" name.
Get the foreign key "type" name.
|
#
|
public
|
getMorphClass(): string
Get the class name of the parent model.
Get the class name of the parent model.
|
#
|
public
|
getInverse(): bool
Get the indicator for a reverse relationship.
Get the indicator for a reverse relationship.
|
#
|