public function coste_lab($id) { $historial = Historial_clinico::find($id); $historial->coste_lab = Input::get('coste_lab'); $historial->update(); $user = Auth::id(); //$profesional = Profesional::where('user_id', $user)->firstOrFail(); return Redirect::action('Historial_clinicoController@show', $historial->paciente_id); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id) { //var_dump($_POST); $input = Input::except('_token'); $i = 1; foreach ($input as $key => $value) { $historial = Historial_clinico::find($id); $historial->abonado_quiron = Input::get('abonado_quiron-' . $i, 0); $historial->cobrado_profesional = Input::get('cobrado_profesional-' . $i, 0); $historial->coste_lab = Input::get('coste_lab-' . $i, 0); $historial->update(); $i++; } echo "HOLA"; //return Redirect::action('FacturacionController@index')->with('message', 'Facturación modificada con éxito.'); }