BelongsToManyRelationship
class BelongsToManyRelationship
Properties
| protected Factory|Collection|Model|array | $factory | The related factory instance. |
|
| protected array|callable | $pivot | The pivot attributes / attribute resolver. |
|
| protected string | $relationship | The relationship name. |
Methods
__construct(Factory|Collection|Model|array $factory, callable|array $pivot, string $relationship)
Create a new attached relationship definition.
Details
at line 32
__construct(Factory|Collection|Model|array $factory, callable|array $pivot, string $relationship)
Create a new attached relationship definition.
at line 42
void
createFor(Model $model)
Create the attached relationship for the given model.
at line 63
BelongsToManyRelationship
recycle(Collection $recycle)
Specify the model instances to always use when creating relationships.