This commit is contained in:
merdan 2022-04-07 15:10:38 +05:00
parent 0ac9ce83b6
commit f4a8cd52dd
1 changed files with 4 additions and 3 deletions

View File

@ -571,9 +571,10 @@ class ProductRepository extends WProductRepository
$brand = $this->brandRepository->firstOrCreate([
'name' => $brand_name
]);
$brand->products()->attach($product);
$brand->save();
$product->brand()->associate($brand);
$product->save();
// $brand->products()->attach($product);
// $brand->save();
}
private function assignImages($product,$images){