From b5abb404dfe9c9a7978c74b6fa2c2beb1a8e4f08 Mon Sep 17 00:00:00 2001 From: Masaki Kawabata Neto Date: Tue, 13 Apr 2021 22:34:44 -0300 Subject: [PATCH] corrigindo $programas que tem de ficar antes --- app/Http/Controllers/PosgradController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PosgradController.php b/app/Http/Controllers/PosgradController.php index 124a27c..aeb4ce9 100644 --- a/app/Http/Controllers/PosgradController.php +++ b/app/Http/Controllers/PosgradController.php @@ -14,6 +14,8 @@ public function index(Request $request) { $this->authorize('admin'); + $programas = SELF::listarProgramas(); + # tratando POST if (isset($request->codcur)) { if ($request->codcur != 0) { @@ -24,7 +26,6 @@ public function index(Request $request) session(['codcur' => $request->codcur]); } - $programas = SELF::listarProgramas(); $alunos = session('codcur') ? json_decode(json_encode(Posgraduacao::alunosPrograma(18, session('codcur')))) : ''; return view('posgrad.index', compact('programas', 'alunos'));