/**
  * Update comment.
  *
  * @param CommentUpdateRequest $request
  * @param $id
  *
  * @return mixed
  */
 public function update(CommentUpdateRequest $request)
 {
     $comment = $this->comment->findOrFail($request->input('id'));
     $this->comment->update($request->all(), $request->input('id'));
     return $this->response->withItem($comment, $this->commentTransformer);
 }
Ejemplo n.º 2
0
 /**
  * Update "seen" in the specified resource in storage.
  *
  * @param  Illuminate\Http\Request $request
  * @param  int  $id
  * @return Response
  */
 public function updateSeen(Request $request, $id)
 {
     $this->comment_gestion->update($request->input('seen'), $id);
     return response()->json();
 }
Ejemplo n.º 3
0
 public function postUpdate(UpdateRequest $request, $id)
 {
     $this->commentRepository->update($id, $request->all());
     return responseSuccess('修改成功', 'comment/index');
 }