Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jwhm's avatar
Level 1

Getting value from collection inside api resource

Okay, so I've managed to get the collection down to https://pastebin.com/5TzLcnWG, removing the excess data for now. However, I don't know how I can access that to return the values.

Http::get()->collect()->collapse()->all();

I am running the above on Http Client, which removes everything but the internal array containing the invoices, which is what I want, however in the API Resource(https://pastebin.com/mLdZdKbW) I am left with this problem.

https://pastebin.com/9taHqUDy returns https://pastebin.com/uM1yVzY2.

I need to remove the tax etc from https://pastebin.com/5TzLcnWG etc

0 likes
0 replies

Please or to participate in this conversation.