protected function updateProductsFeatures(array $attributes, $products)
    {
        $products->each(function ($item, $key) use ($attributes, $products) {
            $item->update(['features' => json_encode($attributes[$item->id])]);
            $item->save();
        });
    }