Spec-Zone.ru › Laravel 8

ОтношениеBelongsToMany

класс BelongsToManyRelationship (Просмотреть исходный код)

Свойства

protected Factory|Collection|Model $factory

Экземпляр связанного фабричного класса.

protected callable|array $pivot

Атрибуты/разрешитель атрибутов pivot.

protected string $relationship

Имя отношения.

Методы

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

Создать новое определение связанного отношения.

void createFor(Model $model)

Создать связанное отношение для заданной модели.

Подробности

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

Создать новое определение связанного отношения.

Параметры

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

Возвращаемое значение

void

void createFor(Model $model)

Создать связанное отношение для заданной модели.

Параметры

Model $model

Возвращаемое значение

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