mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
增加Pivot对象parent属性
This commit is contained in:
@@ -64,7 +64,7 @@ class BelongsToMany extends Relation
|
||||
protected function newPivot($data)
|
||||
{
|
||||
$pivot = $this->pivot ?: '\\think\\model\\Pivot';
|
||||
return new $pivot($data, $this->middle);
|
||||
return new $pivot($this->parent, $data, $this->middle);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user