Fixes for deliveries vs sale_channels

This commit is contained in:
Ludovic CANDELLIER
2021-11-23 23:37:47 +01:00
parent 323330b1a1
commit 5b84ff74e3
36 changed files with 279 additions and 94 deletions

View File

@@ -12,15 +12,11 @@ class Tag
public static function storeTags($model, $tags)
{
if ($tags) {
$tags = collect($tags)->transform(
function ($item, $key) {
return (int) $item;
}
)->toArray();
return $model->syncTags($tags, true);
} else {
return false;
}
$tags = $tags ? collect($tags)->transform(
function ($item, $key) {
return (int) $item;
}
)->toArray() : false;
return $tags ? $model->syncTags($tags, true) : false;
}
}