/**
  * Update the specified SubResourceDetail in storage.
  * PUT/PATCH /subResourceDetails/{id}
  *
  * @param  int              $id
  * @param Request $request
  *
  * @return Response
  */
 public function update($id, Request $request)
 {
     $input = $request->all();
     /** @var SubResourceDetail $subResourceDetail */
     $subResourceDetail = $this->subResourceDetailRepository->apiFindOrFail($id);
     $result = $this->subResourceDetailRepository->updateRich($input, $id);
     $subResourceDetail = $subResourceDetail->fresh();
     return $this->sendResponse($subResourceDetail->toArray(), "SubResourceDetail updated successfully");
 }
 /**
  * Update the specified SubResourceDetail in storage.
  *
  * @param  int              $id
  * @param UpdateSubResourceDetailRequest $request
  *
  * @return Response
  */
 public function update($id, UpdateSubResourceDetailRequest $request)
 {
     $subResourceDetail = $this->subResourceDetailRepository->find($id);
     if (empty($subResourceDetail)) {
         Flash::error('SubResourceDetail not found');
         return redirect(route('subResourceDetails.index'));
     }
     $this->subResourceDetailRepository->updateRich($request->all(), $id);
     Flash::success('SubResourceDetail updated successfully.');
     return redirect(route('subResourceDetails.index'));
 }