src/DataTransferObject.php
public function fillJsonAttribute($key, $value)
    {
        list($key, $path) = explode('->', $key, 2);

        $arrayValue = isset($this->attributes[$key]) ? $this->fromJson($this->attributes[$key]) : [];

        Arr::set($arrayValue, str_replace('->', '.', $path), $value);

        $this->attributes[$key] = $this->asJson($arrayValue);

        return $this;
    }
public function fillJsonAttribute($key, $value)
    {
        list($key, $path) = explode('->', $key, 2);

        $arrayValue = isset($this->attributes[$key]) ? $this->fromJson($this->attributes[$key]) : [];

        Arr::set($arrayValue, str_replace('->', '.', $path), $value);

        $this->attributes[$key] = $this->asJson($arrayValue);

        return $this;
    }
public function fillJsonAttribute ( $ key , $ value ) { list ( $ key , $ path ) = explode ( '->' , $ key , 2 ) ; $ arrayValue = isset ( $ this -> attributes [ $ key ] ) ? $ this -> fromJson ( $ this -> attributes [ $ key ] ) : [ ] ; Arr :: set ( $ arrayValue , str_replace ( '->' , '.' , $ path ) , $ value ) ; $ this -> attributes [ $ key ] = $ this -> asJson ( $ arrayValue ) ; return $ this ; }
Set a given JSON attribute on the object.

@param  string  $key
@param  mixed  $value
@return $this
Set a given JSON attribute on the object .