/** * Removes a single tag * * @param $tagName string */ private function removeTag($tagName) { $tagName = trim($tagName); $normalizer = $this->namespace . '\\TaggingUtil::slug'; $tagSlug = call_user_func($normalizer, $tagName); if ($count = $this->tagged()->where('tag_slug', '=', $tagSlug)->delete()) { TaggingUtil::decrementCount($tagName, $tagSlug, $count); } }