/** * Update the specified Comment in storage. * * @param int $id * @param CreateCommentRequest $request * * @return Response */ public function update($id, CreateCommentRequest $request) { $comment = $this->commentRepository->findCommentById($id); if (empty($comment)) { Flash::error('Comment not found'); return redirect(route('comments.index')); } $comment = $this->commentRepository->update($comment, $request->all()); Flash::message('Comment updated successfully.'); return redirect(route('comments.index')); }