diff --git a/src/Query/EloquentQueryBuilder.php b/src/Query/EloquentQueryBuilder.php index ccbeb44ae4..f4ff60b852 100644 --- a/src/Query/EloquentQueryBuilder.php +++ b/src/Query/EloquentQueryBuilder.php @@ -160,7 +160,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and' return $this->whereNested($column, $boolean); } - if (strtolower($operator) == 'like') { + if ($operator !== null && strtolower($operator) == 'like') { $grammar = $this->builder->getConnection()->getQueryGrammar(); $this->builder->whereRaw('LOWER('.$grammar->wrap($this->column($column)).') LIKE ?', strtolower($value), $boolean);