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