php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Solution for the desc order fetching records to handle in laravel

Open Gunasekar-Skyraan opened this issue 1 year ago • 0 comments

// Get the messages in the inbox $messages = $folder->messages()->all();

// Paginate the messages in descending order and retrieve 5 items per page $messages = $messages->setFetchOrder("desc")->paginate(5);

// Reverse the order of the paginated results without creating a new instance $messages->setCollection(collect(array_reverse($messages->items())));

to imap.php

'fetch_order' => 'desc',

Gunasekar-Skyraan avatar Feb 03 '24 10:02 Gunasekar-Skyraan