class
Illuminate
/
Database
/
Eloquent
/
Relations
/
MorphMany
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
MorphMany
Extends
Methods
public
getResults ( ) : mixed
Get the results of the relationship.
public
initRelation ( array $models , $relation ) : array
Initialize the relation on a set of models.
Parameters
- $models array
- $relation string
public
match ( array $models , Illuminate\...\Collection $results , $relation ) : array
Match the eagerly loaded results to their parents.
Parameters
- $models array
- $results Illuminate\...\Collection
- $relation string
public
forceCreate ( array $attributes ) : Model
Create a new instance of the related model. Allow mass-assignment.
Parameters
- $attributes array
public
forceCreateQuietly ( array $attributes ) : Model
Create a new instance of the related model with mass assignment without raising model events.
Parameters
- $attributes array