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'));