Methods |
public
static
|
fromAttributes(Model $parent, array $attributes, string $table, bool $exists = false): static
Create a new pivot model instance.
Create a new pivot model instance.
|
#
|
public
static
|
fromRawAttributes(Model $parent, array $attributes, string $table, bool $exists = false): static
Create a new pivot model from raw values returned from a query.
Create a new pivot model from raw values returned from a query.
|
#
|
public
|
delete(): int
Delete the pivot model record from the database.
Delete the pivot model record from the database.
|
#
|
public
|
getTable(): string
Get the table associated with the model.
Get the table associated with the model.
|
#
|
public
|
getForeignKey(): string
Get the foreign key column name.
Get the foreign key column name.
|
#
|
public
|
getRelatedKey(): string
Get the "related key" column name.
Get the "related key" column name.
|
#
|
public
|
getOtherKey(): string
Get the "related key" column name.
Get the "related key" column name.
|
#
|
public
|
setPivotKeys(string $foreignKey, string $relatedKey): $this
Set the key names for the pivot model instance.
Set the key names for the pivot model instance.
|
#
|
public
|
hasTimestampAttributes(array|null $attributes = null): bool
Determine if the pivot model or given attributes has timestamp attributes.
Determine if the pivot model or given attributes has timestamp attributes.
|
#
|
public
|
getCreatedAtColumn(): string
Get the name of the "created at" column.
Get the name of the "created at" column.
|
#
|
public
|
getUpdatedAtColumn(): string
Get the name of the "updated at" column.
Get the name of the "updated at" column.
|
#
|
public
|
getQueueableId(): mixed
Get the queueable identity for the entity.
Get the queueable identity for the entity.
|
#
|
public
|
newQueryForRestoration(int[]|string[]|string $ids): Builder
Get a new query to restore one or more models by their queueable IDs.
Get a new query to restore one or more models by their queueable IDs.
|
#
|
public
|
unsetRelations(): $this
Unset all the loaded relations for the instance.
Unset all the loaded relations for the instance.
|
#
|