original_string: public function getDefaultPictureAttribute()
      {
          $default = $this->pictures->where('default', true)->first();
  
          if ($default) {
              return $default->path;
          }
  
          $picture = $this->pictures->first();
  
          if (is_null($picture)) {
              return 'images/no-image.jpg';
          }
  
          return $picture->path;
      }
code: public function getDefaultPictureAttribute()
      {
          $default = $this->pictures->where('default', true)->first();
  
          if ($default) {
              return $default->path;
          }
  
          $picture = $this->pictures->first();
  
          if (is_null($picture)) {
              return 'images/no-image.jpg';
          }
  
          return $picture->path;
      }
code_tokens: public function getDefaultPictureAttribute ( ) { $ default = $ this -> pictures -> where ( 'default' , true ) -> first ( ) ; if ( $ default ) { return $ default -> path ; } $ picture = $ this -> pictures -> first ( ) ; if ( is_null ( $ picture ) ) { return 'images/no-image.jpg' ; } return $ picture -> path ; }
docstring: Returns the product default picture.
  
  @return string
docstring_tokens: Returns the product default picture .