Skip to content

Commit

Permalink
Merge query fields to wheres.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichao-poper committed Nov 11, 2020
1 parent 0a363e6 commit ff26ecf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ConditionsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ private function parseParams(): void
foreach (self::$allowParamKeys as $key) {
if (isset($this->params[$key])) {
$this->customParams[$key] = $this->params[$key];
unset($this->params[$key]);
}
}

if(empty($this->customParams)) {
$this->customParams['wheres'] = $this->params;
}
$this->customParams['wheres'] = array_merge($this->customParams['wheres'], $this->params);
}

protected function wheres(): array
Expand Down

0 comments on commit ff26ecf

Please sign in to comment.