/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Donante::find($id)->delete(); return redirect('donantes'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update($id, Request $request) { //Session::flash('flash_message', 'Persona Actualizada satisfactoriamente'); $donantes = Donante::findOrFail($id); $input = $request->all(); $this->validate($input, Donante::$reglas); ///esto no anda $donantes->fill($input)->save(); return redirect('donantes')->with('key', 'You have done successfully'); }