Esempio n. 1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int $id
  * @return Response
  */
 public function update(TagsForm $result, $id)
 {
     //
     try {
         if (Tag::where('id', $id)->update(Tag::setFieldData())) {
             Notification::success('更新成功');
             return Redirect::route('backend.tags.index');
         }
     } catch (\Exception $e) {
         return Redirect::back()->withErrors(array('error' => $e->getMessage()))->withInput();
     }
 }