@@ -1436,6 +1436,13 @@ public function whereDate($column, $operator, $value = null, $boolean = 'and')
14361436 $ value , $ operator , func_num_args () === 2
14371437 );
14381438
1439+ // If the given operator is not found in the list of valid operators we will
1440+ // assume that the developer is just short-cutting the '=' operators and
1441+ // we will set the operators to '=' and set the values appropriately.
1442+ if ($ this ->invalidOperator ($ operator )) {
1443+ [$ value , $ operator ] = [$ operator , '= ' ];
1444+ }
1445+
14391446 $ value = $ this ->flattenValue ($ value );
14401447
14411448 if ($ value instanceof DateTimeInterface) {
@@ -1477,6 +1484,13 @@ public function whereTime($column, $operator, $value = null, $boolean = 'and')
14771484 $ value , $ operator , func_num_args () === 2
14781485 );
14791486
1487+ // If the given operator is not found in the list of valid operators we will
1488+ // assume that the developer is just short-cutting the '=' operators and
1489+ // we will set the operators to '=' and set the values appropriately.
1490+ if ($ this ->invalidOperator ($ operator )) {
1491+ [$ value , $ operator ] = [$ operator , '= ' ];
1492+ }
1493+
14801494 $ value = $ this ->flattenValue ($ value );
14811495
14821496 if ($ value instanceof DateTimeInterface) {
@@ -1518,6 +1532,13 @@ public function whereDay($column, $operator, $value = null, $boolean = 'and')
15181532 $ value , $ operator , func_num_args () === 2
15191533 );
15201534
1535+ // If the given operator is not found in the list of valid operators we will
1536+ // assume that the developer is just short-cutting the '=' operators and
1537+ // we will set the operators to '=' and set the values appropriately.
1538+ if ($ this ->invalidOperator ($ operator )) {
1539+ [$ value , $ operator ] = [$ operator , '= ' ];
1540+ }
1541+
15211542 $ value = $ this ->flattenValue ($ value );
15221543
15231544 if ($ value instanceof DateTimeInterface) {
@@ -1563,6 +1584,13 @@ public function whereMonth($column, $operator, $value = null, $boolean = 'and')
15631584 $ value , $ operator , func_num_args () === 2
15641585 );
15651586
1587+ // If the given operator is not found in the list of valid operators we will
1588+ // assume that the developer is just short-cutting the '=' operators and
1589+ // we will set the operators to '=' and set the values appropriately.
1590+ if ($ this ->invalidOperator ($ operator )) {
1591+ [$ value , $ operator ] = [$ operator , '= ' ];
1592+ }
1593+
15661594 $ value = $ this ->flattenValue ($ value );
15671595
15681596 if ($ value instanceof DateTimeInterface) {
@@ -1608,6 +1636,13 @@ public function whereYear($column, $operator, $value = null, $boolean = 'and')
16081636 $ value , $ operator , func_num_args () === 2
16091637 );
16101638
1639+ // If the given operator is not found in the list of valid operators we will
1640+ // assume that the developer is just short-cutting the '=' operators and
1641+ // we will set the operators to '=' and set the values appropriately.
1642+ if ($ this ->invalidOperator ($ operator )) {
1643+ [$ value , $ operator ] = [$ operator , '= ' ];
1644+ }
1645+
16111646 $ value = $ this ->flattenValue ($ value );
16121647
16131648 if ($ value instanceof DateTimeInterface) {
@@ -1974,6 +2009,13 @@ public function whereJsonLength($column, $operator, $value = null, $boolean = 'a
19742009 $ value , $ operator , func_num_args () === 2
19752010 );
19762011
2012+ // If the given operator is not found in the list of valid operators we will
2013+ // assume that the developer is just short-cutting the '=' operators and
2014+ // we will set the operators to '=' and set the values appropriately.
2015+ if ($ this ->invalidOperator ($ operator )) {
2016+ [$ value , $ operator ] = [$ operator , '= ' ];
2017+ }
2018+
19772019 $ this ->wheres [] = compact ('type ' , 'column ' , 'operator ' , 'value ' , 'boolean ' );
19782020
19792021 if (! $ value instanceof ExpressionContract) {
0 commit comments