class Illuminate / Database / Eloquent / Relations / MorphPivot
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

MorphPivot

Extends

Properties

protected

$morphType string

The type of the polymorphic relation.

Explicitly define this so it's not included in saved attributes.

Default: null
protected

$morphClass string

The value of the polymorphic relation.

Explicitly define this so it's not included in saved attributes.

Default: null

Methods

protected

setKeysForSaveQuery ( $query ) : Builder

Set the keys for a save update query.

Parameters

protected

setKeysForSelectQuery ( $query ) : Builder

Set the keys for a select query.

Parameters

public

delete ( ) : int

Delete the pivot model record from the database.

public

getMorphType ( ) : string

Get the morph type for the pivot.

public

setMorphType ( $morphType ) : $this

Set the morph type for the pivot.

Parameters

  • $morphType string
public

setMorphClass ( $morphClass ) : MorphPivot

Set the morph class for the pivot.

Parameters

  • $morphClass string
public

getQueueableId ( ) : mixed

Get the queueable identity for the entity.

public

newQueryForRestoration ( $ids ) : Builder

Get a new query to restore one or more models by their queueable IDs.

Parameters

  • $ids array|int
protected

newQueryForCollectionRestoration ( array $ids ) : Builder

Get a new query to restore multiple models by their queueable IDs.

Parameters

  • $ids array