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

BelongsToManyRelationship

Properties

protected

$factory Factory |Collection |Model

The related factory instance.

Default: null
protected

$pivot callable|array

The pivot attributes / attribute resolver.

Default: null
protected

$relationship string

The relationship name.

Default: null

Methods

public

__construct ( $factory , $pivot , $relationship ) : void

Create a new attached relationship definition.

Parameters

public

createFor ( Model $model ) : void

Create the attached relationship for the given model.

Parameters