Pivot::morphTo()

MorphTo morphTo(string $name = null, string $type = null, string $id = null) Define a polymorphic, inverse one-to-one or many relationship. Parameters string $name string $type string $id Return Value MorphTo

Pivot::morphOne()

MorphOne morphOne(string $related, string $name, string $type = null, string $id = null, string $localKey = null) Define a polymorphic one-to-one relationship. Parameters string $related string $name string $type string $id string $localKey Return Value MorphOne

Pivot::morphMany()

MorphMany morphMany(string $related, string $name, string $type = null, string $id = null, string $localKey = null) Define a polymorphic one-to-many relationship. Parameters string $related string $name string $type string $id string $localKey Return Value MorphMany

Pivot::morphedByMany()

MorphToMany morphedByMany(string $related, string $name, string $table = null, string $foreignKey = null, string $otherKey = null) Define a polymorphic, inverse many-to-many relationship. Parameters string $related string $name string $table string $foreignKey string $otherKey Return Value MorphToMany

Pivot::makeVisible()

$this makeVisible(array|string $attributes) Make the given, typically hidden, attributes visible. Parameters array|string $attributes Return Value $this

Pivot::makeHidden()

$this makeHidden(array|string $attributes) Make the given, typically visible, attributes hidden. Parameters array|string $attributes Return Value $this

Pivot::load()

$this load(array|string $relations) Eager load relations on the model. Parameters array|string $relations Return Value $this

Pivot::jsonSerialize()

array jsonSerialize() Convert the object into something JSON serializable. Return Value array

Pivot::joiningTable()

string joiningTable(string $related) Get the joining table name for a many-to-many relation. Parameters string $related Return Value string

Pivot::isUnguarded()

static bool isUnguarded() Determine if current state is "unguarded". Return Value bool