protected function savePosition(array $data)
    {
        DB::transaction(function() use($data) {
            $widgets = $data['widgets'];
            foreach ($widgets as $item) {
                $id    = $item['widgetId'];
                $model = ComponentParams::where('id', $id)->first();
                if (is_null($model)) {
                    continue;
                }
                $position    = array_only($item, ['x', 'y', 'width', 'height']);
                $data        = $model->data;
                $model->data = array_merge($data, $position);
                $this->repository->saveEntity($model);
            }
        });
        return true;
    }