select('id')->get(); $meusTrabalhosId = Participante::where('user_id', '=', Auth()->user()->id) ->whereIn('trabalho_id', $trabalhosId)->select('trabalho_id')->get(); $projetos = Trabalho::whereIn('id', $meusTrabalhosId)->get(); //dd($projetos); return view('participante.projetos')->with(['edital' => $edital, 'projetos' => $projetos]); } }