public function update($id, $name)
 {
     Assertion::string($name);
     $tag = $this->tags->tagOfId($id);
     $tag->name = $name;
     $tag->slug = Str::slug($name);
     $this->tags->update($tag);
     return $tag;
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $input = Input::all();
     $thumb = '';
     if (isset($input['thumb'])) {
         $thumb = $input['thumb'];
     }
     $tag = $this->tagServices->update($id, $input['name'], $input['price'], $input['active'], $thumb, $input['content']);
     if (!$tag) {
         return $this->respondNotFound('Tag does not exist');
     }
     $this->tagRepository->update($tag);
     return $this->respond(['data' => $this->transform($tag)]);
 }