MorphPivot::newFromBuilder()

Model newFromBuilder(array $attributes = array(), string|null $connection = null) Create a new model instance that is existing. Parameters array $attributes string|null $connection Return Value Model

MorphPivot::newEloquentBuilder()

Builder|Model newEloquentBuilder(Builder $query) Create a new Eloquent query builder for the model. Parameters Builder $query Return Value Builder|Model

MorphPivot::newCollection()

Collection newCollection(array $models = array()) Create a new Eloquent Collection instance. Parameters array $models Return Value Collection

MorphPivot::morphToMany()

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

MorphPivot::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

MorphPivot::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

MorphPivot::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

MorphPivot::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

MorphPivot::load()

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

MorphPivot::jsonSerialize()

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