@@ -62,7 +62,7 @@ class WhereQuery extends Query {
62
62
'OR ' , 'AND ' ,
63
63
'ALL ' , 'ANSWERED ' , 'BCC ' , 'BEFORE ' , 'BODY ' , 'CC ' , 'DELETED ' , 'FLAGGED ' , 'FROM ' , 'KEYWORD ' ,
64
64
'NEW ' , 'NOT ' , 'OLD ' , 'ON ' , 'RECENT ' , 'SEEN ' , 'SINCE ' , 'SUBJECT ' , 'TEXT ' , 'TO ' ,
65
- 'UNANSWERED ' , 'UNDELETED ' , 'UNFLAGGED ' , 'UNKEYWORD ' , 'UNSEEN '
65
+ 'UNANSWERED ' , 'UNDELETED ' , 'UNFLAGGED ' , 'UNKEYWORD ' , 'UNSEEN ' , ' UID '
66
66
];
67
67
68
68
/**
@@ -460,6 +460,33 @@ public function whereLanguage($country_code) {
460
460
return $ this ->where ("Content-Language $ country_code " );
461
461
}
462
462
463
+ /**
464
+ * Get message be it UID.
465
+ *
466
+ * @param int|string $uid
467
+ *
468
+ * @return WhereQuery
469
+ * @throws InvalidWhereQueryCriteriaException
470
+ */
471
+ public function whereUid ($ uid )
472
+ {
473
+ return $ this ->where ('UID ' , $ uid );
474
+ }
475
+
476
+ /**
477
+ * Get messages by their UIDs.
478
+ *
479
+ * @param array<int, int> $uids
480
+ *
481
+ * @return WhereQuery
482
+ * @throws InvalidWhereQueryCriteriaException
483
+ */
484
+ public function whereUidIn ($ uids )
485
+ {
486
+ $ uids = implode (', ' , $ uids );
487
+ return $ this ->where ('UID ' , $ uids );
488
+ }
489
+
463
490
/**
464
491
* Apply the callback if the given "value" is truthy.
465
492
* copied from @url https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Traits/Conditionable.php
0 commit comments