You have nested, see https://stackoverflow.com/questions/35547605/how-to-handle-nested-json-object-request-in-laravel-5 for example.
Jul 12, 2022
3
Level 4
how should this look in a request
I have this snippet of code that uses $request->token->item_id and I'm trying to see what the value of it is, but I think I'm sending in the request incorrectly. I'm sending it to my end point as a json like so
{
"testing": 123,
"token": {
"item_id": 456
}
}
and I keep getting Trying to get property 'item_id' of non-object. How should my request be sent so that I can access item_id ?
Please or to participate in this conversation.