메소드 |
설명 |
|
__construct ( Builder $query, Model $parent, string $type, string $id ) : void |
Create a new has many relationship instance. |
|
addConstraints ( ) : void |
Set the base constraints on the relation query. |
|
addEagerConstraints ( array $models ) : void |
Set the constraints for an eager load of the relation. |
|
create ( array $attributes ) : Model |
Create a new instance of the related model. |
|
getAndResetWheres ( ) : array |
Remove the original where clause set by the relationship. |
|
getMorphClass ( ) : string |
Get the class name of the parent model. |
|
getMorphType ( ) : string |
Get the foreign key "type" name. |
|
save ( Model $model ) : Model |
Attach a model instance to the parent model. |
|