original_string: protected function instanceWrite($property, $value)
      {
          $field = "{$this->name}_{$property}";
  
          // This is not fillable as it is the one required attribute
          if ($property === 'file_name') {
              $this->getInstance()->setAttribute($field, $value);
          }
  
          // Queue state is optional and outside of the fillable
          elseif (preg_match('/^queue(d?)_/', $property)) {
              if ($this->isQueueable()) {
                  $this->getInstance()->setAttribute($field, $value);
              }
          }
  
          // All other attributes must be fillable to have their values set
          else {
              if (in_array($field, $this->getInstance()->getFillable())) {
                  $this->getInstance()->setAttribute($field, $value);
              }
          }
      }
code: protected function instanceWrite($property, $value)
      {
          $field = "{$this->name}_{$property}";
  
          // This is not fillable as it is the one required attribute
          if ($property === 'file_name') {
              $this->getInstance()->setAttribute($field, $value);
          }
  
          // Queue state is optional and outside of the fillable
          elseif (preg_match('/^queue(d?)_/', $property)) {
              if ($this->isQueueable()) {
                  $this->getInstance()->setAttribute($field, $value);
              }
          }
  
          // All other attributes must be fillable to have their values set
          else {
              if (in_array($field, $this->getInstance()->getFillable())) {
                  $this->getInstance()->setAttribute($field, $value);
              }
          }
      }
code_tokens: protected function instanceWrite ( $ property , $ value ) { $ field = "{$this->name}_{$property}" ; // This is not fillable as it is the one required attribute if ( $ property === 'file_name' ) { $ this -> getInstance ( ) -> setAttribute ( $ field , $ value ) ; } // Queue state is optional and outside of the fillable elseif ( preg_match ( '/^queue(d?)_/' , $ property ) ) { if ( $ this -> isQueueable ( ) ) { $ this -> getInstance ( ) -> setAttribute ( $ field , $ value ) ; } } // All other attributes must be fillable to have their values set else { if ( in_array ( $ field , $ this -> getInstance ( ) -> getFillable ( ) ) ) { $ this -> getInstance ( ) -> setAttribute ( $ field , $ value ) ; } } }
docstring: Set an attachment attribute on the underlying model instance.
  
  @param string $property
  @param mixed  $value
  
  @return void
docstring_tokens: Set an attachment attribute on the underlying model instance .