You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this is not the appropriate method for a realtime chat application. If a message is sent between the time that a user loads the first and second pages of messages, the offset will point to one of the previously retrieved messages. This is exactly the problem that cursor-based pagination aims to solve, not to mention better performance.
Currently, retrieving messages from a conversation uses offset-based pagination:
chat/src/Models/Conversation.php
Lines 310 to 343 in 8f03df6
However, this is not the appropriate method for a realtime chat application. If a message is sent between the time that a user loads the first and second pages of messages, the offset will point to one of the previously retrieved messages. This is exactly the problem that cursor-based pagination aims to solve, not to mention better performance.
I believe the solution is as simple as changing
chat/src/Models/Conversation.php
Line 327 in 8f03df6
to
->cursorPaginate(
and removing redundant pagination parameters.The text was updated successfully, but these errors were encountered: