@@ -307,6 +307,9 @@ public function where(
307
307
$ this ->whereNotLike ($ key , $ value , true , $ boolean );
308
308
} elseif ($ operator === 'not ilike ' ) {
309
309
$ this ->whereNotLike ($ key , $ value , false , $ boolean );
310
+ } else {
311
+ $ where ->push (($ where ->count () ? $ boolean . ' ' : '' ) . $ key . ' ' . $ operator . ' ' . $ value );
312
+ $ this ->query ->put ('where ' , $ where );
310
313
}
311
314
} else {
312
315
$ value = !is_int ($ value ) ? json_encode ($ value ) : $ value ;
@@ -1049,7 +1052,7 @@ public function orWhereNotNull(string $key, string $boolean = '|'): self
1049
1052
*
1050
1053
* @return self
1051
1054
*/
1052
- public function whereDate (string $ key , $ operator , $ value , string $ boolean = '& ' ): self
1055
+ public function whereDate (string $ key , $ operator , $ value = null , string $ boolean = '& ' ): self
1053
1056
{
1054
1057
[$ value , $ operator ] = $ this ->prepareValueAndOperator ($ value , $ operator ,
1055
1058
func_num_args () === 2 );
@@ -1113,7 +1116,7 @@ public function orWhereDate(string $key, $operator, $value, string $boolean = '|
1113
1116
*
1114
1117
* @return self
1115
1118
*/
1116
- public function whereYear (string $ key , $ operator , $ value , string $ boolean = '& ' ): self
1119
+ public function whereYear (string $ key , $ operator , $ value = null , string $ boolean = '& ' ): self
1117
1120
{
1118
1121
[$ value , $ operator ] = $ this ->prepareValueAndOperator ($ value , $ operator ,
1119
1122
func_num_args () === 2 );
@@ -1311,7 +1314,7 @@ public function cache($seconds): self
1311
1314
*
1312
1315
* @return string
1313
1316
*/
1314
- protected function getQuery (): string
1317
+ public function getQuery (): string
1315
1318
{
1316
1319
return $ this ->query ->map (function ($ value , $ key ) {
1317
1320
if ($ key === 'where ' ) {
@@ -1443,7 +1446,7 @@ function () use ($endpoint) {
1443
1446
});
1444
1447
}
1445
1448
1446
- $ this ->initClient ();
1449
+ $ this ->init ();
1447
1450
1448
1451
return $ data ;
1449
1452
}
@@ -1560,7 +1563,7 @@ function () use ($accessToken, $endpoint) {
1560
1563
->json ();
1561
1564
});
1562
1565
1563
- $ this ->initClient ();
1566
+ $ this ->init ();
1564
1567
1565
1568
return $ data ;
1566
1569
}
0 commit comments