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