class BelongsToManyRelationship (View source)
protected Factory | $factory | The related factory instance. | |
protected callable|array | $pivot | The pivot attributes / attribute resolver. | |
protected string | $relationship | The relationship name. |
void | __construct(Factory $factory, callable|array $pivot, string $relationship) Create a new attached relationship definition. | |
void | createFor(Model $model) Create the attached relationship for the given model. |
Create a new attached relationship definition.
Create the attached relationship for the given model.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.html