This commit is contained in:
thinkphp
2017-09-05 10:28:21 +08:00
parent bb3fb74bb7
commit 26482e4ed0

View File

@@ -65,7 +65,6 @@ trait SoftDelete
} else { } else {
// 删除条件 // 删除条件
$where = $this->getWhere(); $where = $this->getWhere();
// 删除当前模型数据 // 删除当前模型数据
$result = $this->getQuery()->where($where)->delete(); $result = $this->getQuery()->where($where)->delete();
} }
@@ -76,7 +75,7 @@ trait SoftDelete
$name = is_numeric($key) ? $name : $key; $name = is_numeric($key) ? $name : $key;
$model = $this->getAttr($name); $model = $this->getAttr($name);
if ($model instanceof Model) { if ($model instanceof Model) {
$model->delete(); $model->delete($force);
} }
} }
} }