From 6ac2cdbf53bd1941efe9db82510511e58ca4bc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 2 Sep 2021 14:20:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Traits/QueryTrait.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Traits/QueryTrait.php b/src/Traits/QueryTrait.php index 2a5a64e..d2d8737 100644 --- a/src/Traits/QueryTrait.php +++ b/src/Traits/QueryTrait.php @@ -823,8 +823,12 @@ trait QueryTrait $this->where[] = $this->makeClosureFunction($column); return $this; } - [$column, $opera, $value] = $this->opera(...func_get_args()); - $this->where[] = "$column $opera $value"; + if (is_string($column)) { + $this->where[] = $column; + } else { + [$column, $opera, $value] = $this->opera(...func_get_args()); + $this->where[] = "$column $opera $value"; + } return $this; }