original_string: protected function getRelationName()
      {
          $relation = array_get($this->actionData->options(), 'relation');
  
          if ($relation) {
              return $relation;
          }
  
          /** @var ModelInformationRepositoryInterface $infoRepository */
          $infoRepository = app(ModelInformationRepositoryInterface::class);
  
          $info = $infoRepository->getByModelClass($this->otherModelClass);
  
          if ( ! $info || empty($info->list->parents) || count($info->list->parents) !== 1) {
              return false;
          }
  
          return head($info->list->parents)->relation;
      }
code: protected function getRelationName()
      {
          $relation = array_get($this->actionData->options(), 'relation');
  
          if ($relation) {
              return $relation;
          }
  
          /** @var ModelInformationRepositoryInterface $infoRepository */
          $infoRepository = app(ModelInformationRepositoryInterface::class);
  
          $info = $infoRepository->getByModelClass($this->otherModelClass);
  
          if ( ! $info || empty($info->list->parents) || count($info->list->parents) !== 1) {
              return false;
          }
  
          return head($info->list->parents)->relation;
      }
code_tokens: protected function getRelationName ( ) { $ relation = array_get ( $ this -> actionData -> options ( ) , 'relation' ) ; if ( $ relation ) { return $ relation ; } /** @var ModelInformationRepositoryInterface $infoRepository */ $ infoRepository = app ( ModelInformationRepositoryInterface :: class ) ; $ info = $ infoRepository -> getByModelClass ( $ this -> otherModelClass ) ; if ( ! $ info || empty ( $ info -> list -> parents ) || count ( $ info -> list -> parents ) !== 1 ) { return false ; } return head ( $ info -> list -> parents ) -> relation ; }
docstring: Returns configured relation name for children link.
  
  Falls back to list.parents relation name if exactly one given.
  
  @return string|false
docstring_tokens: Returns configured relation name for children link .