Пример #1
0
 /**
  * Store updating model and redirect
  *
  * @param type $id current number
  *
  * @param type $request data from form
  *
  * @return main page
  */
 public function update($id)
 {
     $new = Request::all();
     $old = Food::findOrFail($id);
     $old->update($new);
     \Session::flash('flash_message', 'This position has been updated!');
     return redirect('food');
 }