mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
改进
This commit is contained in:
@@ -529,7 +529,6 @@ class BelongsToMany extends Relation
|
||||
public function attached($data)
|
||||
{
|
||||
if ($data instanceof Model) {
|
||||
// 根据关联表主键直接写入中间表
|
||||
$relationFk = $data->getPk();
|
||||
$id = $data->$relationFk;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user