This commit is contained in:
2021-08-09 18:17:17 +08:00
parent f3f023268a
commit 1f913041b7
+6 -2
View File
@@ -495,12 +495,16 @@ trait QueryTrait
} }
/** /**
* @param array $conditionArray * @param array|Closure|string $conditionArray
* *
* @return QueryTrait * @return QueryTrait
* @throws
*/ */
public function whereOr(array $conditionArray = []): static public function whereOr(array|Closure|string $conditionArray = []): static
{ {
if ($conditionArray instanceof Closure) {
$conditionArray = $this->makeClosureFunction($conditionArray);
}
$this->where = ['or', $conditionArray]; $this->where = ['or', $conditionArray];
return $this; return $this;
} }