改进onlyTrashed方法

This commit is contained in:
thinkphp
2016-08-20 21:27:07 +08:00
parent b627a645ca
commit 2b4a15ed49

View File

@@ -37,7 +37,7 @@ trait SoftDelete
public static function onlyTrashed()
{
$model = new static();
return $model->db()->where(static::$deleteTime, '>', 0);
return $model->db()->where(static::$deleteTime, 'exp', 'is not null');
}
/**