コード例 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     //verificamos que el docente exista
     $iddocente = Input::get('docente');
     if ($docente = MiembroComJusticia::where('dni', '=', $iddocente)->first()) {
         $datosformulario = Input::all();
         DB::table('tmiembrojusticia')->where('dni', $id)->update(array('rol' => $datosformulario['rol'], 'nombre' => $datosformulario['nombre'], 'apellidoP' => $datosformulario['apellidopaterno'], 'apellidoM' => $datosformulario['apellidomaterno'], 'codCampeonato' => $datosformulario['campeonato']));
         return Redirect::to('miembrocomjusticia/listar');
     }
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function editarmiembro($id)
 {
     $consultatabla = MiembroComJusticia::where('dni', '=', $id)->get();
     return View::make('miembrocomjusticia.editar')->with('consultatabla', $consultatabla);
 }