vendor categories fx9

This commit is contained in:
merdan 2022-11-18 15:57:18 +05:00
parent e77e509b14
commit 170ae64c85
1 changed files with 4 additions and 0 deletions

View File

@ -62,12 +62,16 @@ class CategoryRepository extends WCategoryRepository
$category->vendors()->sync($data['vendors']);
}
return $category;
}
public function update(array $data, $id, $attribute = 'id'){
$category = parent::update($data,$id,$attribute );
if (isset($data['vendors'])) {
$category->vendors()->sync($data['vendors']);
}
return $category;
}
}