Access Json multidimensional PHP / Laravel

1

I'm trying to access a multidimensional Json via laravel and I'm not getting the expected result, I need to access phases-> gaming-> date-> 2017-05-13 I'll post the code below to find a solution :

My array:

Controller.php

publicfunctionindex(){//JSONDOSARQUIVOS$arquivo_json=file_get_contents('http://jsuol.com.br/c/monaco/utils/gestor/commons.js?file=commons.uol.com.br/sistemas/esporte/modalidades/futebol/campeonatos/dados/2017/30/dados.json');$dadosJson=json_decode($arquivo_json,true);returnview('ler',compact('dadosJson'));}

view.php

@foreach($dadosJson['fases']as$equipes)@foreach($equipes['jogos']as$jogos){{$jogos['nome']}}@endforeach@endforeach

Return

Could someone give me a hand?

Thank you!

    
asked by anonymous 27.06.2018 / 15:10

1 answer

0

I was able to access print_r, but to view it I can not always get the error:

changes in controller.php

return view('ler')->with('dadosJson', $dadosJson);

return by print_r

Array(
[0] => 97071
[1] => 97073)
     1            
                Array(
[0] => 97071
[1] => 97073)
     1           
                Array(
[0] => 97071
[1] => 97073)

return without print_r {{$ teams ['games'] ['data'] ['2017-05-13']}}

Any help?

    
27.06.2018 / 16:36