From 2486bfd4d1d8dcf8beb4da8f1fb4ac5bc48d0b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 17 Apr 2023 10:57:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Traits/QueryTrait.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index 2ad1037..490bd20 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -777,6 +777,17 @@ trait QueryTrait } + /** + * @param Closure $closure + * @return $this + */ + public function whereClosure(Closure $closure): static + { + $this->where[] = $this->makeClosureFunction($closure); + return $this; + } + + /** * @param Closure|array $closure * @return string