original_string: public function render()
      {
          $relation = $this->model->{$this->name}();
  
          $renderable = $this->getNullRenderable();
  
          if ($relation    instanceof HasOne
              || $relation instanceof BelongsTo
              || $relation instanceof MorphOne
          ) {
              $model = $this->model->{$this->name};
  
              if (!$model instanceof Model) {
                  $model = $relation->getRelated();
              }
  
              $renderable = new Show($model, $this->builder);
  
              $renderable->panel()->title($this->title);
          }
  
          if ($relation    instanceof HasMany
              || $relation instanceof MorphMany
              || $relation instanceof BelongsToMany
              || $relation instanceof HasManyThrough
          ) {
              $renderable = new Grid($relation->getRelated(), $this->builder);
  
              $renderable->setName($this->name)
                  ->setTitle($this->title)
                  ->setRelation($relation);
          }
  
          return $renderable->render();
      }
code: public function render()
      {
          $relation = $this->model->{$this->name}();
  
          $renderable = $this->getNullRenderable();
  
          if ($relation    instanceof HasOne
              || $relation instanceof BelongsTo
              || $relation instanceof MorphOne
          ) {
              $model = $this->model->{$this->name};
  
              if (!$model instanceof Model) {
                  $model = $relation->getRelated();
              }
  
              $renderable = new Show($model, $this->builder);
  
              $renderable->panel()->title($this->title);
          }
  
          if ($relation    instanceof HasMany
              || $relation instanceof MorphMany
              || $relation instanceof BelongsToMany
              || $relation instanceof HasManyThrough
          ) {
              $renderable = new Grid($relation->getRelated(), $this->builder);
  
              $renderable->setName($this->name)
                  ->setTitle($this->title)
                  ->setRelation($relation);
          }
  
          return $renderable->render();
      }
code_tokens: public function render ( ) { $ relation = $ this -> model -> { $ this -> name } ( ) ; $ renderable = $ this -> getNullRenderable ( ) ; if ( $ relation instanceof HasOne || $ relation instanceof BelongsTo || $ relation instanceof MorphOne ) { $ model = $ this -> model -> { $ this -> name } ; if ( ! $ model instanceof Model ) { $ model = $ relation -> getRelated ( ) ; } $ renderable = new Show ( $ model , $ this -> builder ) ; $ renderable -> panel ( ) -> title ( $ this -> title ) ; } if ( $ relation instanceof HasMany || $ relation instanceof MorphMany || $ relation instanceof BelongsToMany || $ relation instanceof HasManyThrough ) { $ renderable = new Grid ( $ relation -> getRelated ( ) , $ this -> builder ) ; $ renderable -> setName ( $ this -> name ) -> setTitle ( $ this -> title ) -> setRelation ( $ relation ) ; } return $ renderable -> render ( ) ; }
docstring: Render this relation panel.
  
  @return string
docstring_tokens: Render this relation panel .