/**
  * @param Exercise $exercise
  * @param UpdateExerciseRequest $request
  * @return RedirectResponse
  */
 public function update(Exercise $exercise, UpdateExerciseRequest $request) : RedirectResponse
 {
     $exercise->update($request->all());
     return redirect('/lessons/' . $exercise->lesson_id);
 }
 /**
  * @param UpdateExerciseRequest $request
  * @param Exercise $exercise
  * @return JsonResponse
  */
 public function updateExercise(UpdateExerciseRequest $request, Exercise $exercise)
 {
     $exercise->update($request->all());
     return $this->response($exercise);
 }
 /**
  * @param Exercise $exercise
  * @param UpdateExerciseRequest $request
  * @return RedirectResponse
  */
 public function updateExercise(Exercise $exercise, UpdateExerciseRequest $request) : RedirectResponse
 {
     $this->authorizeForUser($this->user(), 'modify', $exercise);
     $exercise->update($request->all());
     return redirect('/learn/lessons/' . $exercise->lesson_id . '?requested_exercise_id=' . $exercise->id);
 }