Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for the desc order fetching records to handle in laravel #471

Open
Gunasekar-Skyraan opened this issue Feb 3, 2024 · 0 comments

Comments

@Gunasekar-Skyraan
Copy link

// 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',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant