BelongsToMany::chunk()

bool chunk(int $count, callable $callback) Chunk the results of the query. Parameters int $count callable $callback Return Value bool

BelongsToMany::attach()

void attach(mixed $id, array $attributes = array(), bool $touch = true) Attach a model to the parent. Parameters mixed $id array $attributes bool $touch Return Value void

BelongsToMany::addEagerConstraints()

void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. Parameters array $models Return Value void

BelongsToMany::addConstraints()

void addConstraints() Set the base constraints on the relation query. Return Value void

BelongsToMany

BelongsToMany class BelongsToMany extends Relation (View source) Methods void __construct(Builder $query, Model $parent, string $table, string $foreignKey, string $otherKey, string $relationName = null) Create a new belongs to many relationship instance. void addConstraints() Set the base constraints on the relation query. void addEagerConstraints(array $models) Set the constraints for an eager load of the relation. array initRelation(array $models, string $relation) Initia

BelongsTo::__construct()

void __construct(Builder $query, Model $parent, string $foreignKey, string $otherKey, string $relation) Create a new belongs to relationship instance. Parameters Builder $query Model $parent string $foreignKey string $otherKey string $relation Return Value void

BelongsTo::__clone()

void __clone() Force a clone of the underlying query builder when cloning. Return Value void

BelongsTo::__call()

mixed __call(string $method, array $parameters) Handle dynamic method calls to the relationship. Parameters string $method array $parameters Return Value mixed

BelongsTo::wrap()

string wrap(string $value) Wrap the given value with the parent query's grammar. Parameters string $value Return Value string

BelongsTo::updatedAt()

string updatedAt() Get the name of the "updated at" column. Return Value string