Level 75
Check this discussion: https://laracasts.com/discuss/channels/vue/paginating-from-my-response
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This is JSON
{
"status":"success",
"data":{
"stats":{"total":12643,"offset":0,"limit":50,"order":"desc","totalMarkets":83232},
"base":{"symbol":"USD","sign":"$"},
"photos":[{"id":1,....................................},
}
}
Above the "limit":50 is the count of items on a page.
$host = config('api_host');
$key = config('api_key');
$collection = Http::withHeaders([
'x-rapidapi-host' => $host,
'x-rapidapi-key' => $key
])->get('https://localhost/stats');
return view('stats', ['collection'=>$collection['data']]);
How to put pagination on the blade page? How to send the page number to the API URL
https://localhost/stats?page=2
https://localhost/stats?page=3
Please or to participate in this conversation.