Example #1
0
 public function createNivel()
 {
     $nivel = new Nivel();
     $nivel->nome = Input::get('nome');
     $nivel->save();
     Session::flash('message', 'Dados gravados com sucesso');
     return Redirect('nivel');
 }
Example #2
0
 public function showVagas()
 {
     $vagas = Vaga::all();
     $vaga = Vaga::all()->isEmpty();
     $nivel = Nivel::lists('nome', 'id');
     return view("gestorEmpregador")->with(array('vagas' => $vagas, 'nivel' => $nivel, 'vaga' => $vaga));
 }
Example #3
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 creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $niveles = Nivel::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');
     return view('admin.materias.crear')->with('niveles', $niveles);
 }
Example #5
0
 public function getCursos($id)
 {
     $nivel = Nivel::find($id);
     $curso = $nivel->cursos()->getQuery()->get(['id', 'nome']);
     return Response::json($curso);
 }