mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user