Пример #1
0
 public function update(QuestionValidatedRequest $request, $question_id)
 {
     try {
         $updatedQuestion = $this->questionService->updateQuestion($request->all(), $question_id);
     } catch (QuestionServiceException $e) {
         return Response::json(['error' => ['message' => $e->getMessage()]], 404);
     }
     return Response::json($updatedQuestion->toArray(), 202, [], JSON_NUMERIC_CHECK);
 }