class Illuminate / Database / Eloquent / Factories / Relationship
You are viewing an older version of the documentation. For the latest, please visit master documentation.

Relationship

Properties

protected

$factory Factory

The related factory instance.

Default: null
protected

$relationship string

The relationship name.

Default: null

Methods

public

__construct ( Factory $factory , $relationship ) : void

Create a new child relationship instance.

Parameters

public

createFor ( Model $parent ) : void

Create the child relationship for the given parent model.

Parameters