Maria30's avatar
Level 21

How to return the pagination results?

Those results are from an Api

	
current_page	1
data	
0	
Rank	1
Status	"Recruiting"
NCTId	"NCT04682574"
Organization	"University of Lahore"
Sponsor	"University of Lahore"
1	
Rank	2
Status	"Not yet recruiting"
NCTId	"NCT04682561"
Organization	"St. Michael's Hospital, Toronto"
Sponsor	"St. Michael's Hospital, Toronto"
first_page_url	"http://localhost:8888/clinical-trials?page=1"
from	1
last_page	5
last_page_url	"http://localhost:8888/clinical-trials?page=5"
next_page_url	"http://localhost:8888/clinical-trials?page=2"
path	"http://localhost:8888/clinical-trials"
per_page	2
prev_page_url	null
to	2
total	10

and in the controller

$fullStudies = $trialsApiService->fullStudies()->paginate(2);

0 likes
1 reply

Please or to participate in this conversation.