superlatif / nova-tag-input
Tag input field for Laravel Nova.
Installs: 198 815
Dependents: 6
Suggesters: 0
Security: 0
Stars: 14
Watchers: 1
Forks: 17
Open Issues: 7
Language:Vue
Requires
- php: >=7.1.0
- laravel/nova: ^4.0
README
This plugin incorporate the Vue Tags Input plugin by Johannes Munari into Laravel Nova by creating a new field type.
Nova 4
This release must be used with Nova version 4 and above. Thanks to @dmason30 for the PR. To install a Nova 3 compatible version please see at the end.
Installing
Using Composer:
composer require superlatif/nova-tag-input
Example
Basic
Tags::make(__("Tags"), 'tags')
->help("Press ENTER to add tag")
->placeholder("Add a new tag")
->allowEditTags(true)
->addOnKeys([13, ':', ';', ',']) // 13 = Enter key
->autocompleteItems([
'Arizona',
'California',
'Colorado',
'Michigan',
'New York',
'Texas',
]),
Autocomplete items from Eloquent
$tags = Tag::pluck('title')->get();
Tags::make(__("Tags"), 'tags')
// ...
->autocompleteItems($tags)
// ...
Parameters
Installing
To use a Nova 3 compatible version please use the following command:
composer require superlatif/nova-tag-input:3.0
Support us!
If you think we saved you some time on your development, please consider showing your appreciation 😁