app/Http/Controllers/TurmaController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $response = Http::get('http://localhost:8000/api/turma/');
        $objTurma = json_decode(json_encode($response->json()));
        return view('turma.list')->with('turmas', $objTurma);
    }
public function index ( ) { $ response = Http :: get ( 'http://localhost:8000/api/turma/' ) ; $ objTurma = json_decode ( json_encode ( $ response -> json ( ) ) ) ; return view ( 'turma.list' ) -> with ( 'turmas' , $ objTurma ) ; }
Display a listing of the resource.
Display a listing of the resource .
//dd($response->json()); //$objCurso = CursoModel::findOrfail($objTurma->curso_id);//traz o nome do curso