Exemple #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(Request $request, $id)
 {
     $idioma = Idioma::find($id);
     $idioma->lingua = $request->get('lingua');
     $idioma->dominioEsc = $request->get('dominioEsc');
     $idioma->dominioFala = $request->get('dominioFala');
     $idioma->dominioLei = $request->get('dominioLei');
     $idioma->save();
     $idiomas = true;
     $vista = 'idiomaEdit';
     Session::flash('message', 'Dados gravados com sucesso');
     return view('gestorCurriculum', ["idiomas" => $idiomas, "vista" => $vista, "idioma" => $idioma, 'nav' => "idioma"]);
 }
Exemple #2
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     if (Auth::user()->estudante()->first()) {
         $estudante = Auth::user()->estudante()->first();
         $d = true;
         $vista = 'estudante';
         return view('gestorCurriculum', ['d' => $d, 'est' => $estudante, 'vista' => $vista]);
     }
     $idiomas = lingua::lists('idioma', 'id');
     $_SESSION['estudante'] = true;
     $vagas = Vaga::all();
     $cursos = \App\curso::all();
     $nivel = Nivel::lists('nome', 'id');
     $vaga = Vaga::all()->isEmpty();
     $fillable = Auth::user()->get();
     $fillable2 = Auth::user()->tipo;
     //$emp=Auth::user()->empregador()->first;
     $vista = 'estudanteGravar';
     if ($fillable2 == 'estudante') {
         return view('gestorCurriculum', ['vista' => $vista]);
     } elseif ($fillable2 == 'empregador') {
         $vista = 'empregador';
         $vagas = Vaga::all();
         return view('gestorEmpregador', ['vagas' => $vagas, 'idiomas' => $idiomas, 'nivel' => $nivel, 'cursos' => $cursos, 'vista' => $vista]);
     } else {
         $idiomas = Idioma::lists('lingua', 'id');
         $vaga = Vaga::all();
         return view('gestorNucleo', ["vaga" => $vaga, "idiomas" => $idiomas]);
     }
     /*  if($fillable.isEmpty()){
                   return view('gestorEmpregador',['vaga'=>$vaga]);
     
               }else
                   return view('gestorCurriculum');*/
     //return view('home');
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $editoriales = Editorial::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');
     $generos = Genero::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');
     $idiomas = Idioma::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');
     $formatos = Formato::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');
     $libro = Libro::find($id);
     return view('admin.libros.edit')->with('editoriales', $editoriales)->with('generos', $generos)->with('idiomas', $idiomas)->with('formatos', $formatos)->with('libro', $libro);
 }
Exemple #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  *
  *
  */
 public function index()
 {
     $idiomas = Idioma::lists('lingua', 'id');
     return view('Procurar', ['idiomas' => $idiomas]);
 }