Illuminate\Database\Eloquent\Model::fillJsonAttribute PHP Метод

fillJsonAttribute() публичный Метод

Set a given JSON attribute on the model.
public fillJsonAttribute ( string $key, mixed $value )
$key string
$value mixed
    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;
    }
Model