A Laravel Nova field for storing tags on a model in one column. This will be stored as a JSON string.
You can install the package via composer:
composer require marshmallow/nova-tags-field
Prepare your resources and models to make use of the taggable fields.
Add the tags field to your Nova resource.
use Marshmallow\TagsField\Tags;
public function fields(Request $request)
{
Tags::make('Tags'),
}
Cast the columns where you want to store your tags as an array. Otherwise creating resources will fail.
protected $casts = [
'tags' => 'array'
];
use Marshmallow\TagsField\Tags;
public function fields(Request $request)
{
Tags::make('Tags')->addMoreText('Add another...'),
}
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.
- All Contributors
- Package is based on nova-tags-field from Spatie
The MIT License (MIT). Please see License File for more information.