original_string: public function getAttribute($key)
      {
          // Sanitize the key
          $key = preg_replace('/^_/', '', $key);
  
          // Decoder ring for legacy keys
          switch ($key) {
              case 'size':
                  $key = 'file_size';
                  break;
              case 'filename':
              case 'original_filename':
                  $key = 'file_name';
                  break;
          }
  
          return $this->getInstance()
              ->getAttribute("{$this->name}_{$key}");
      }
code: public function getAttribute($key)
      {
          // Sanitize the key
          $key = preg_replace('/^_/', '', $key);
  
          // Decoder ring for legacy keys
          switch ($key) {
              case 'size':
                  $key = 'file_size';
                  break;
              case 'filename':
              case 'original_filename':
                  $key = 'file_name';
                  break;
          }
  
          return $this->getInstance()
              ->getAttribute("{$this->name}_{$key}");
      }
code_tokens: public function getAttribute ( $ key ) { // Sanitize the key $ key = preg_replace ( '/^_/' , '' , $ key ) ; // Decoder ring for legacy keys switch ( $ key ) { case 'size' : $ key = 'file_size' ; break ; case 'filename' : case 'original_filename' : $ key = 'file_name' ; break ; } return $ this -> getInstance ( ) -> getAttribute ( "{$this->name}_{$key}" ) ; }
docstring: Return the attachment attribute value.
  
  @param string $key
  
  @return mixed
docstring_tokens: Return the attachment attribute value .