/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update($id) { $widget = Widget::find($id); $widget->title = Input::get('title'); $widget->purpose = Input::get('purpose'); $widget->save(); return redirect('widgets')->with('status', 'Profile updated!'); }
public function postQuickUpdate() { $inputs = Input::all(); $widget = Widget::find($inputs['pk']); $widget->{$inputs}['name'] = $inputs['value']; Log::info("widgets save" . $widget->id . " " . $widget->name); $widget->save(); return "test"; }