Spec-Zone.ru › Laravel 8

BelongsToManyRelationship

class BelongsToManyRelationship (View source)

Properties

protected Factory|Collection|Model $factory

The related factory instance.

protected callable|array $pivot

The pivot attributes / attribute resolver.

protected string $relationship

The relationship name.

Methods

void __construct(Factory|Collection|Model $factory, callable|array $pivot, string $relationship)

Create a new attached relationship definition.

void createFor(Model $model)

Create the attached relationship for the given model.

Details

void __construct(Factory|Collection|Model $factory, callable|array $pivot, string $relationship)

Create a new attached relationship definition.

Parameters

Factory|Collection|Model $factory
callable|array $pivot
string $relationship

Return Value

void

void createFor(Model $model)

Create the attached relationship for the given model.

Parameters

Model $model

Return Value

void

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API