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 | Type | Description |
---|---|---|
$model | Illuminate\Database\Eloquent\Model |
Illuminate\Database\Eloquent\Model
|
$sessionKey | mixed |
mixed
|
Returns
mixed
public
create (array $attributes = []
, $sessionKey = null
)
Create a new instance of this related model with deferred binding support.
Parameters
Property | Type | Description |
---|---|---|
$attributes | array |
array
|
$sessionKey | mixed |
mixed
|
Returns
mixed
public
remove (Illuminate\Database\Eloquent\Model $model, $sessionKey = null
)
Removes a model from this relationship type.
Parameters
Property | Type | Description |
---|---|---|
$model | Illuminate\Database\Eloquent\Model |
Illuminate\Database\Eloquent\Model
|
$sessionKey | mixed |
mixed
|
Returns
mixed
public
save (Illuminate\Database\Eloquent\Model $model, $sessionKey = null
)
Save the supplied related model with deferred binding support.
Parameters
Property | Type | Description |
---|---|---|
$model | Illuminate\Database\Eloquent\Model |
Illuminate\Database\Eloquent\Model
|
$sessionKey | mixed |
mixed
|
Returns
mixed
Used by
← Previous page
Winter\Storm\Database\Relations\Concerns\HasOneOrMany
Next page →
Winter\Storm\Database\Relations\HasMany
Copyright © 2024 Winter CMS