Пример #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int        $id
  * @param  TagRequest $request
  * @return Response
  */
 public function update($id, TagRequest $request)
 {
     $tag = $this->tag->find($id);
     if (is_null($tag)) {
         return redirect()->route('tag.index')->with('error', 'Tag not found.');
     }
     if ($tag->update($request->all())) {
         return redirect('tag')->with('success', 'Tag successfully updated!');
     }
     return redirect('tag')->with('error', 'Problem updating Tag!');
 }