Tag ​
The tag input type renders VInputTag, a tag picker backed by the Modularous Tag entity. It auto-resolves the list of available tags and the update endpoint from the current module/route context, or from an explicit taggable model class.
Hydrate ​
Class: TagHydrateConfig type: tagOutput type: input-tag → VInputTag
The hydrate:
- Sets
returnObject: false,chips: false,multiple: falseas base defaults - Auto-resolution via
_moduleName/_routeName(set automatically by the module config pipeline):- Resolves
endpoint→{module}.{route}.tagsaction URL - Resolves
updateEndpoint→{module}.{route}.tagsUpdateaction URL - Fetches
itemsviarepository->getTags() - Sets
taggableto the repository's model class
- Resolves
- Explicit
taggableclass (when_moduleNameis absent):- Fetches items via
$taggableModel->localeTagsList()(translated) orTag::whereNamespace($taggable)->get()
- Fetches items via
- Falls back
updateEndpointtoroute('admin.tag.update')if not resolved - Sets
defaultto the first item'sitemValue(non-translated, non-empty items only)
Translated tags ​
When translated: true is set, the hydrate adds a cacheKey (locale-scoped) and an updatePayload carrying the current locale so tag updates are applied to the correct translation.
Usage ​
Auto-resolved (standard module context) ​
php
[
'type' => 'tag',
'name' => 'tags',
'label' => 'Tags',
]Translated tags ​
php
[
'type' => 'tag',
'name' => 'tags',
'label' => 'Tags',
'translated' => true,
]Explicit taggable model ​
php
[
'type' => 'tag',
'name' => 'tags',
'label' => 'Tags',
'taggable' => \App\Models\Post::class,
]Schema Defaults ​
| Key | Default | Description |
|---|---|---|
itemValue | 'id' | Field used as the tag value |
itemTitle | 'name' | Field displayed for each tag |
cascadeKey | 'items' | Key used when cascading tag lists |
returnObject | false | Return tag ID rather than full tag object |
chips | false | Display selected tags as chips |
multiple | false | Allow multiple tag selection |
default | first item's itemValue | Pre-selected tag (non-translated, non-empty only) |
See Also ​
- Tagger — Free-form tag creation input (different from Tag)
- Hydrates reference — Resolution table and schema contract