|
@@ -56,6 +56,7 @@ class SitePagesTag extends EloquentRepository
|
|
|
$tagArray = array_map('trim', $tagArray);
|
|
|
$existingTags = $model
|
|
|
->whereIn('name', $tagArray)
|
|
|
+ ->where('dist_id', getDistributorId())
|
|
|
->pluck('id', 'name') // We also get the name => id mapping
|
|
|
->toArray();
|
|
|
$tagsToInsert = array_diff($tagArray, array_keys($existingTags));
|