diff --git a/src/Query/Builder.php b/src/Query/Builder.php index c818957..d0f609b 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -370,6 +370,36 @@ public function where(string $column, mixed $operator, mixed $value = null): sta return $this; } + public function whereNot(string $column, mixed $value): static + { + return $this->where($column, '!=', $value); + } + + public function whereIn(string $column, array $values): static + { + return $this->where($column, 'in', $values); + } + + public function whereNotIn(string $column, array $values): static + { + return $this->where($column, 'not in', $values); + } + + public function whereBetween(string $column, int|string $start, int|string $end): static + { + return $this->where($column, 'between', [$start, $end]); + } + + public function whereLike(string $column, string $value): static + { + return $this->where($column, 'like', $value); + } + + public function whereNotLike(string $column, string $value): static + { + return $this->where($column, 'not like', $value); + } + protected function getFilters(): array { return collect($this->filters)->mapWithKeys(function (array $value, string $column) { diff --git a/src/Query/Concerns/NonFilterable.php b/src/Query/Concerns/NonFilterable.php index 1db2ef3..72ccc39 100644 --- a/src/Query/Concerns/NonFilterable.php +++ b/src/Query/Concerns/NonFilterable.php @@ -10,4 +10,34 @@ public function where(string $column, mixed $operator, mixed $value = null): sta { return $this; } + + public function whereNot(string $column, mixed $value): static + { + return $this; + } + + public function whereIn(string $column, array $values): static + { + return $this; + } + + public function whereNotIn(string $column, array $values): static + { + return $this; + } + + public function whereBetween(string $column, int|string $start, int|string $end): static + { + return $this; + } + + public function whereLike(string $column, string $value): static + { + return $this; + } + + public function whereNotLike(string $column, string $value): static + { + return $this; + } }