Esempio n. 1
0
 /**
  * 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!');
 }
Esempio n. 2
0
 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";
 }