original_string: protected function collects()
      {
          if ($this->collects) {
              return $this->collects;
          }
  
          if (Str::endsWith(class_basename($this), 'Collection') &&
              class_exists($class = Str::replaceLast('Collection', '', get_class($this)))) {
              return $class;
          }
      }
code: protected function collects()
      {
          if ($this->collects) {
              return $this->collects;
          }
  
          if (Str::endsWith(class_basename($this), 'Collection') &&
              class_exists($class = Str::replaceLast('Collection', '', get_class($this)))) {
              return $class;
          }
      }
code_tokens: protected function collects ( ) { if ( $ this -> collects ) { return $ this -> collects ; } if ( Str :: endsWith ( class_basename ( $ this ) , 'Collection' ) && class_exists ( $ class = Str :: replaceLast ( 'Collection' , '' , get_class ( $ this ) ) ) ) { return $ class ; } }
docstring: Get the resource that this resource collects.
  
  @return string|null
docstring_tokens: Get the resource that this resource collects .