How do I parse this json inside array data in view blade?
问题 Currently this is my view {{ $data["id_user"] }} my controller $client = new Client; $request = $client->get('url')->getBody()->getContents(); return view('Admin/lala')->with('data', json_decode($request, true)); get api { "code": 200, "data": [ { "id_user": 1 } ] } I wanted to display it, I've tried it like in here but it's still an error. is there something wrong when I parse the data 回答1: As in your json your id_user is inside array data so you have to use foreach in your blade. Controller