From 535e17b1a03085ed73fdc1e57f555e1abee08fd1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 25 Oct 2016 20:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=BD=AF=E5=88=A0=E9=99=A4wi?= =?UTF-8?q?thTrashed=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/traits/model/SoftDelete.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/traits/model/SoftDelete.php b/library/traits/model/SoftDelete.php index 4bb072dc..e110ff25 100644 --- a/library/traits/model/SoftDelete.php +++ b/library/traits/model/SoftDelete.php @@ -27,7 +27,7 @@ trait SoftDelete public static function withTrashed() { $model = new static(); - return $model->db(); + return $model->db(false); } /** @@ -39,7 +39,7 @@ trait SoftDelete { $model = new static(); $field = $model->getDeleteTimeField(); - return $model->db()->where($field, 'exp', 'is not null'); + return $model->db(false)->where($field, 'exp', 'is not null'); } /**