这是来自API的数据,但我不知道如何对该数据进行分页,以便我可以在视图中显示它。 这是控制器功能: -
$client =new Client();
$req = $client->request('GET','https://api.sandbox.amadeus.com/v1.2/flights/affiliate-search?apikey=lFzCNHVGO7NkDJVeUzb2ejHvIS1dIA4A&origin='.$origin.'&destination='.$destination.'&departure_date='.$dateDeparture.'&return_date='.$dateReturn.'&adults='.$adultsCount.'&children='.$ChildCount);
$data = $req->getBody()->getContents();
$flights = \GuzzleHttp\json_decode($data);
foreach ($flights->results as $flight)
{
dd($flight->deep_link);
}