updatesServiceFees = $updatesServiceFees; } public function execute(int $forwarderId, Request $request){ try{ $object = new ServiceObject($request->input('type'), $forwarderId, $request->input('name'), $request->input('description'), $request->input('cost')); return $this->updatesServiceFees->execute($object, $request->input('id')); return new JsonResponse([],HttpStatus::REQUEST_ACCEPTED); }catch (\Exception $exception){ throw new InternalServerErrorException("Failed to update Service Fees because{$exception->getMessage()}"); } } }