'Request To Change Order Address', 'message' => 'You have successfully request to change order address' ]; } /** @var RequestChangeOrderAddressProcessor */ private $requestChangeOrderAddressProcessor; /** * RequestChangeOrderAddressLogic constructor. * @param RequestChangeOrderAddressProcessor $requestChangeOrderAddressProcessor */ public function __construct(RequestChangeOrderAddressProcessor $requestChangeOrderAddressProcessor) { $this->requestChangeOrderAddressProcessor = $requestChangeOrderAddressProcessor; } /** * @param Request $request * @return JsonResponse * @throws \App\Classes\Exceptions\MalformedRequestException */ public function logic(Request $request): JsonResponse { $order = $this->requestChangeOrderAddressProcessor->execute($request); return $this->resourceResponse(new OrderResource($order)); } }