Friday, November 18, 2022

[FIXED] How to get last page url in twilio pagination php

Issue

$page = isset($input['page'])?$input['page']:0;
$perPageRecord = 10;
$calls = $this->twilio->calls->page(["to" => "+919876543210"],$perPageRecord,'',$page);
$data = [];
echo $calls->getNextPageUrl; 
exit;

I am using above code to get next page url and it print successfully. But i want to print last page url while In php twilio. Anyone can tell me how can i get last page url using twilio php. Thanks


Solution

It looks like you will need to programmatically extract a returned range and manipulate the resulting data to get the X most recent results (last page).

Replacing Absolute Paging and Related Properties

Usage and Migration Guide for Twilio's PHP Helper Library 5.x



Answered By - Alan
Answer Checked By - Katrina (PHPFixing Volunteer)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.