repository = $repository; } public function execute(string $orderId, StepObject $step){ try{ $repository = $this->repository->where('order_id',$orderId)->where('reference_id',$step->getReferenceId())->first(); $repository->complete_date = $step->getCompleteDate(); $repository->save(); return $repository; return new JsonResponse([], HttpStatus::OK); } catch (\Exception $exception){ throw new InternalServerErrorException("Failed to update receive note because {$exception->getMessage()}"); } } }