original_string: public function store(Model $model, $source, $value)
      {
          if ( ! $this->isTranslated()) {
              $this->performStore($model, $source, $value);
              return;
          }
  
          /** @var Model|Translatable $model */
  
          if ( ! is_array($value)) {
              throw new UnexpectedValueException("Value should be in per-locale array format for translatable data");
          }
  
          foreach ($value as $locale => $singleValue) {
  
              // Safeguard: use empty string if non-nullable translated field is null
              if (null === $singleValue && ! $this->isNullable()) {
                  $singleValue = '';
              }
  
              $this->performStore($model->translateOrNew($locale), $source, $singleValue);
          }
      }
code: public function store(Model $model, $source, $value)
      {
          if ( ! $this->isTranslated()) {
              $this->performStore($model, $source, $value);
              return;
          }
  
          /** @var Model|Translatable $model */
  
          if ( ! is_array($value)) {
              throw new UnexpectedValueException("Value should be in per-locale array format for translatable data");
          }
  
          foreach ($value as $locale => $singleValue) {
  
              // Safeguard: use empty string if non-nullable translated field is null
              if (null === $singleValue && ! $this->isNullable()) {
                  $singleValue = '';
              }
  
              $this->performStore($model->translateOrNew($locale), $source, $singleValue);
          }
      }
code_tokens: public function store ( Model $ model , $ source , $ value ) { if ( ! $ this -> isTranslated ( ) ) { $ this -> performStore ( $ model , $ source , $ value ) ; return ; } /** @var Model|Translatable $model */ if ( ! is_array ( $ value ) ) { throw new UnexpectedValueException ( "Value should be in per-locale array format for translatable data" ) ; } foreach ( $ value as $ locale => $ singleValue ) { // Safeguard: use empty string if non-nullable translated field is null if ( null === $ singleValue && ! $ this -> isNullable ( ) ) { $ singleValue = '' ; } $ this -> performStore ( $ model -> translateOrNew ( $ locale ) , $ source , $ singleValue ) ; } }
docstring: Stores a submitted value on a model
  
  @param Model  $model
  @param string $source
  @param mixed  $value
docstring_tokens: Stores a submitted value on a model