original_string: public function image()
      {
          if ($this->relationLoaded('mediables')) {
              return $this->mediables->where('type', 'image')->first();
          }
  
          return $this->mediables()
              ->where('media.type', 'image')
              ->whereNull('mediables.type')
              ->first();
      }
code: public function image()
      {
          if ($this->relationLoaded('mediables')) {
              return $this->mediables->where('type', 'image')->first();
          }
  
          return $this->mediables()
              ->where('media.type', 'image')
              ->whereNull('mediables.type')
              ->first();
      }
code_tokens: public function image ( ) { if ( $ this -> relationLoaded ( 'mediables' ) ) { return $ this -> mediables -> where ( 'type' , 'image' ) -> first ( ) ; } return $ this -> mediables ( ) -> where ( 'media.type' , 'image' ) -> whereNull ( 'mediables.type' ) -> first ( ) ; }
docstring: Image object.
  
  @return \Routegroup\Media\File
docstring_tokens: Image object .