Tag Groups
February 22, 2026 ยท View on GitHub
TagGroups are a simple feature that let you group a set of tags together
php artisan tagging:create-group MyTagGroup
Assign a group when tagging a model
$article->tag('Gardening', group: 'MyTagGroup');
$article->tag(['Gardening', 'Floral'], group: 'MyTagGroup');
Or set the tag group directly on a tag
$tag->setGroup('MyTagGroup');
To get all the tags in a certain group
Tag::inGroup('MyTagGroup')->get()
Check if a tag is in a group
$tag->isInGroup('MyTagGroup');