-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
Description
I don't know if I'm not using it properly, but when I use paginate() the items are just arrays of true, while with limit() I get the messages.
Here is how I use it:
$imap = new Imap(array_merge(
$attributes,
[
'password' => decrypt($this->attributes['password']),
],
[
'masks' => [
'attachment' => \Webklex\PHPIMAP\Support\Masks\AttachmentMask::class,
'message' => \Webklex\PHPIMAP\Support\Masks\MessageMask::class,
],
],
));
$imap->connect();
$folders = $imap->getFolders(); // Returns a correct list
$pages = $imap->getFolderByPath('folder')->messages()->all()->paginate();
$limited = $imap->getFolderByPath('folder')->messages()->all()->limit(5)->get();So, $pages contains 5 items which are all the value true. $limited on the other hand, contains 5 Message instances which are correct.
Am I missing something?