code: public function childAssociate($request, $idParent, $idChild, $relation)
      {
          $request->request->merge([
              'url' => $request->request->path()
          ]);
          
          $idParent = $this->getRealId($idParent);
          $idChild = $this->getRealId($idChild);
          
          $resourceChild = $this->repository->attach($idParent, $idChild, $relation, $request->all());
          
          if (! $resourceChild) {
              // return $this->notFound();
          }
          
          return $this->success([
              $resourceChild
          ]);
      }
docs: Associate a new child
  
  @return \Illuminate\Http\Response