/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { try { $removed = $this->questionService->removeVote($id); } catch (QuestionServiceException $e) { return Response::json(['error' => $e->getMessage()], 406); } return Response::json($removed, 200, [], JSON_NUMERIC_CHECK); }