Fixes for deliveries vs sale_channels

This commit is contained in:
Ludovic CANDELLIER
2021-11-23 23:37:47 +01:00
parent f6668a6dd3
commit 6dce60d227
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;
}
}