Skip to content

Commit

Permalink
Merge pull request #44 from web-care/where-not-between-params-fix
Browse files Browse the repository at this point in the history
whereNotBetween params fix
  • Loading branch information
basemkhirat authored Oct 23, 2017
2 parents 9f9c7a6 + 1543d60 commit bb64ecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ public function whereBetween($name, $first_value, $last_value = null)
{

if (is_array($first_value) && count($first_value) == 2) {
$first_value = $first_value[0];
$last_value = $first_value[1];
$first_value = $first_value[0];
}

$this->filter[] = ["range" => [$name => ["gte" => $first_value, "lte" => $last_value]]];
Expand All @@ -630,8 +630,8 @@ public function whereNotBetween($name, $first_value, $last_value = null)
{

if (is_array($first_value) && count($first_value) == 2) {
$first_value = $first_value[0];
$last_value = $first_value[1];
$first_value = $first_value[0];
}

$this->must_not[] = ["range" => [$name => ["gte" => $first_value, "lte" => $last_value]]];
Expand Down

0 comments on commit bb64ecf

Please sign in to comment.