MorphMany

 class Winter\Storm\Database\Relations\MorphMany
extends Illuminate\Database\Eloquent\Relations\MorphMany

Extends

Traits

Properties

inherited protected $relationName : string

Inherited from MorphOneOrMany

The "name" of the relationship.

Methods

public __construct (Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Model $parent, $type, $id, $localKey, $relationName = null) : void

Create a new has many relationship instance.

Parameters
Property Description
$query
Illuminate\Database\Eloquent\Builder
$parent
Illuminate\Database\Eloquent\Model
$type
mixed
$id
mixed
$localKey
mixed
$relationName
mixed
Returns
void

public getSimpleValue ()

Helper for getting this relationship simple value, generally useful with form values.

Returns
mixed

public setSimpleValue ($value)

Helper for setting this relationship using various expected values. For example, $model->relation = $value;

Parameters
Property Description
$value
mixed
Returns
mixed

inherited public add (Illuminate\Database\Eloquent\Model $model, $sessionKey = null)

Inherited from MorphOneOrMany

Adds a model to this relationship type.

Parameters
Property Description
$model
Illuminate\Database\Eloquent\Model
$sessionKey
mixed
Returns
mixed

inherited public addDefinedConstraints () : void

Inherited from DefinedConstraints

Set the defined constraints on the relation query.

Returns
void

inherited public addDefinedConstraintsToQuery (Illuminate\Database\Eloquent\Relations\Relation | Winter\Storm\Database\QueryBuilder $query, array | null $args = null)

Inherited from DefinedConstraints

Add query based constraints.

Parameters
Property Description
$query
Illuminate\Database\Eloquent\Relations\Relation | Winter\Storm\Database\QueryBuilder
$args
array | null
Returns
mixed

inherited public addDefinedConstraintsToRelation (Illuminate\Database\Eloquent\Relations\Relation $relation, array | null $args = null)

Inherited from DefinedConstraints

Add relation based constraints.

Parameters
Property Description
$relation
Illuminate\Database\Eloquent\Relations\Relation
$args
array | null
Returns
mixed

inherited public create (array $attributes = [], $sessionKey = null)

Inherited from MorphOneOrMany

Create a new instance of this related model with deferred binding support.

Parameters
Property Description
$attributes
array
$sessionKey
mixed
Returns
mixed

inherited public remove (Illuminate\Database\Eloquent\Model $model, $sessionKey = null)

Inherited from MorphOneOrMany

Removes a model from this relationship type.

Parameters
Property Description
$model
Illuminate\Database\Eloquent\Model
$sessionKey
mixed
Returns
mixed

inherited public save (Illuminate\Database\Eloquent\Model $model, $sessionKey = null)

Inherited from MorphOneOrMany

Save the supplied related model with deferred binding support.

Parameters
Property Description
$model
Illuminate\Database\Eloquent\Model
$sessionKey
mixed
Returns
mixed
Copyright © 2024 Winter CMS