当使用cURL时,我如何能够在get\\u all中包含一个调用,该调用基本上会在接下来的所有页面中循环,获取数据,然后在“next\\u page”参数变为null时将其输出到$response->data?
Here is the method:
public function get_all()
{
return $response->data;
}
This is what $response->data is returning as of now (此处未包含cURL代码):
"paginator": {
"total": 3092,
"per_page": 500,
"current_page": 2,
"last_page": 7,
"prev_page": "https://oc.com/api/v1/employees/?page=1",
"next_page": "https://oc.com/api/v1/employees/?page=3"
},
"data": [
{
"id": 1592,
etc....