protected detach ( string $taggableId, ArrayAccess | array $tags ) : void | ||
$taggableId | string | taggable id |
$tags | ArrayAccess | array | tag instances |
Résultat | void |
protected function detach($taggableId, $tags)
{
/** @var Tag $tag */
foreach ($tags as $tag) {
$tag->getConnection()->table($tag->getTaggableTable())->where('tagId', $tag->getKey())->where('taggableId', $taggableId)->delete();
$tag->decrement('count');
}
}