updatesCustomerRelation = $updatesCustomerRelation; } public function execute(Request $request){ try{ $object = new CustomerRelationObject($request->input('forwarder_id'), $request->input('company_id'), $request->input('customer_rate'), $request->input('wave')); return $this->updatesCustomerRelation->execute($object); return new JsonResponse([], HttpStatus::REQUEST_ACCEPTED); }catch(\Exception $exception){ throw new InternalServerErrorException("Failed to update Customer Relation because{$exception->getMessage()}"); } } }