mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进
This commit is contained in:
@@ -74,7 +74,7 @@ class BelongsToMany extends Relation
|
||||
protected function newPivot($data = [])
|
||||
{
|
||||
$class = $this->pivotName ?: '\\think\\model\\Pivot';
|
||||
$pivot = new $class($this->parent, $data, $this->middle);
|
||||
$pivot = new $class($data, $this->parent, $this->middle);
|
||||
if ($pivot instanceof Pivot) {
|
||||
return $pivot;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user