diff --git a/docs/filtering.md b/docs/filtering.md index 35e2e54..4e1200d 100644 --- a/docs/filtering.md +++ b/docs/filtering.md @@ -33,7 +33,7 @@ Another available parameter is `filterByOr`, `search` and `searchByOr`. * **columnName** - (Required) - Name of column you want to filter, for relationships use `dots`. * **operator** - (Optional | Default: `eq`) Type of operator you want to use. -* **not** - (Optional | Default: `false`) Negate the filter (Accepted values: yes|true|1). +* **not** - (Optional | Default: `false`) Negate the filter (Accepted values: not|yes|true|1). #### Example filters diff --git a/src/Controllers/LaravelController.php b/src/Controllers/LaravelController.php index 4712db7..ead5b41 100644 --- a/src/Controllers/LaravelController.php +++ b/src/Controllers/LaravelController.php @@ -244,6 +244,7 @@ protected function parseFilters(array $filters, $or = false, $defaultOperator = if (is_array($part)) { $not = ($arrayCountValues == 2) ? key($part[$operator]) : false; + $not = $not === 'not' ? true : $not; $not = $not ? filter_var($not, FILTER_VALIDATE_BOOLEAN) : false; $value = $part[(string)key($part)];