MorphOneOrMany
Table of Contents
- $relationName : string
- add() : mixed
- Adds a model to this relationship type.
- create() : mixed
- Create a new instance of this related model with deferred binding support.
- remove() : mixed
- Removes a model from this relationship type.
- save() : mixed
- Save the supplied related model with deferred binding support.
Properties
$relationName
protected
string
$relationName
The "name" of the relationship.
Methods
add()
Adds a model to this relationship type.
public
add(Model $model[, mixed $sessionKey = null ]) : mixed
Parameters
- $model : Model
- $sessionKey : mixed = null
Return values
mixed —create()
Create a new instance of this related model with deferred binding support.
public
create([array<string|int, mixed> $attributes = [] ][, mixed $sessionKey = null ]) : mixed
Parameters
- $attributes : array<string|int, mixed> = []
- $sessionKey : mixed = null
Return values
mixed —remove()
Removes a model from this relationship type.
public
remove(Model $model[, mixed $sessionKey = null ]) : mixed
Parameters
- $model : Model
- $sessionKey : mixed = null
Return values
mixed —save()
Save the supplied related model with deferred binding support.
public
save(Model $model[, mixed $sessionKey = null ]) : mixed
Parameters
- $model : Model
- $sessionKey : mixed = null