mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正软删除的destroy方法
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace traits\model;
|
||||
|
||||
use think\Collection;
|
||||
use think\db\Query;
|
||||
use think\Model;
|
||||
|
||||
@@ -111,7 +112,7 @@ trait SoftDelete
|
||||
}
|
||||
|
||||
// 包含软删除数据
|
||||
$query = self::withTrashed();
|
||||
$query = (new static())->db(false);
|
||||
if (is_array($data) && key($data) !== 0) {
|
||||
$query->where($data);
|
||||
$data = null;
|
||||
|
||||
Reference in New Issue
Block a user