/** * Delete an existing comment. * * @param int $postId * @param int $id * * @return \Illuminate\Http\JsonResponse */ public function destroy($postId, $id) { $comment = CommentRepository::find($id); $this->checkComment($comment); $comment->delete(); return Response::json(['success' => true, 'msg' => 'Comment deleted successfully.', 'comment_id' => $id]); }
/** * Delete an existing comment. * * @param int $postId * @param int $id * * @return \Illuminate\Http\JsonResponse */ public function destroy($postId, $id) { $comment = CommentRepository::find($id); $this->checkComment($comment); $comment->delete(); return Response::json(['success' => true, 'msg' => trans('messages.comment.delete_success'), 'comment_id' => $id]); }