fix mix
This commit is contained in:
parent
0ac9ce83b6
commit
f4a8cd52dd
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Reference in New Issue