MorphOneOrMany

 trait Winter\Storm\Database\Relations\Concerns\MorphOneOrMany

Properties

protected $relationName : string

The "name" of the relationship.

Methods

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

Adds a model to this relationship type.

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

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

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

Parameters
Property Description
$attributes
array
$sessionKey
mixed
Returns
mixed

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

Removes a model from this relationship type.

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

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

Save the supplied related model with deferred binding support.

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

Used by

Class Description
MorphMany
MorphOne
Copyright © 2024 Winter CMS