Attack
Forum Üyesi
- Katılım
- 4 Şub 2023
- Mesajlar
- 2,618
- Puanları
- 0
Hello,
I've added a new API endpoint to an addon we use (Snogs Advanced forms).
It seems to fetch the items (forms) but the api result returns an array of objects sorted alphabetically.
The code for returning the data is:
PHP:
return $this->apiResult([ 'forms' => $forms->toApiResults(), 'pagination' => $this->getPaginationData($forms, $page, $perPage, $total)]);
The JSON example:
JSON:
{ "posid": 1, "z_connectedThread": 0, "z_description": "testing form"...
I've added a new API endpoint to an addon we use (Snogs Advanced forms).
It seems to fetch the items (forms) but the api result returns an array of objects sorted alphabetically.
The code for returning the data is:
PHP:
return $this->apiResult([ 'forms' => $forms->toApiResults(), 'pagination' => $this->getPaginationData($forms, $page, $perPage, $total)]);
The JSON example:
JSON:
{ "posid": 1, "z_connectedThread": 0, "z_description": "testing form"...
Misafirler için gizlenen link, görmek için
Giriş yap veya üye ol.