Closed Coldzer0 closed 7 years ago
@Coldzer0 $this->makeMessageCollection()
get data from here https://github.com/nahid/talk/blob/master/src/Conversations/ConversationRepository.php#L152 and here I write pagination code
try it it's not working :D or give me an example please , test it .
the main problem is $collection->messages = $conversations->messages;
cuz it return all the messages for the conversations .
thanks
@Coldzer0 thank you for finding out this problem. I issue was solved. Now you can use paginate with offset
and take
.
To use this update please use dev-master
I just upgraded from Laravel 5.0 to 5.4. When I go to see messages between two different users, no messages come up. After debugging, I have found that if I comment out line 164 in ConversationRepository.php ($query->offset($offset)->take($take);) then messages are displayed fine.
Are you sure eager loading with limits is working as you expected? Thanks for the help!
I have the same problem as @boofman15, using Laravel 5.6.
i'm using the test example and i try to edit
i'v 122 message in the db $conversations = Talk::getMessagesByUserId($id); to $conversations = Talk::getMessagesByUserId($id,0,10);
it return 122 every time
i think the main problem is here $this->makeMessageCollection($conversations);
this call the messages relation without any limit .