01 2022 Microsite Promotion
This commit is contained in:
parent
3f1fb9377d
commit
38e7fd504a
39 changed files with 761 additions and 336 deletions
|
|
@ -159,7 +159,18 @@ class ProductRepository extends BaseRepository {
|
|||
'attribute_id' => $attribute->attribute_id,
|
||||
]);
|
||||
}
|
||||
//INCS
|
||||
$ingredients = $model->p_ingredients()->pluck('ingredient_id')->toArray();
|
||||
if(is_array($ingredients)){
|
||||
foreach ($ingredients as $incs_id){
|
||||
ProductIngredient::create([
|
||||
'product_id' => $this->model->id,
|
||||
'ingredient_id' => $incs_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//images
|
||||
foreach ($model->images as $image){
|
||||
$name = \App\Services\Slim::sanitizeFileName($image->original_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue