Closed IronicTrout closed 12 months ago
Hey @IronicTrout!
I think your problem is you are calling $conversations->getPage($page);
, but you're not assigning the result to the variable, so when you call $conversations->toArray();
at the end, $conversations
still contains the first page.
You should do this instead:
$conversations = $conversations->getPage($page);
Like this, getPage($page)
returns a new instance of PagedCollection
containing the page you requested, and you replace the current value of the $conversations
variable with that new instance.
Ah what a bone-head mistake. Thank you for your help!
Thank you for taking the time to submit an issue with all the details shown below. Our engineering team monitors issues submitted and strives to respond with 1-2 business days.
Current behavior Gets the same page (first page only?)
Expected behavior Gets the correct page
I'm running the following code and it always seems to be fetching the same page of conversations and I'm not sure why. I know that $page is coming into the function correctly but it always seems to be fetching the same 25 results. Any help would be much appreciated!