How could you access the name
one located in league?
I was able to access lastName
with this:
$url = "https://www.easports.com/fifa/ultimate-team/api/fut/item";
$response = Http::get($url);
$data = $response->json(['items']);
foreach ($data as $obj) {
$name = "nombre de jugador: ". $obj['firstName'] . '<br>';
print ($name);
}
"items": [{
"commonName": "Cristiano Ronaldo",
"firstName": "C. Ronaldo",
"lastName": "dos Santos Aveiro",
"league": {
"imageUrls": {},
"abbrName": "ITA 1",
"id": 31,
"imgUrl": null,
"name": "Serie A TIM"
},
}],
I am getting the data from https://www.easports.com/fifa/ultimate-team/api/fut/item