marshmallow / nova-tags-field
A tags field for Nova apps
Installs: 6 404
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 2
Language:Vue
Requires
- php: ^7.1|^8.0
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ^5.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2022-06-04 14:17:53 UTC
README
A tags field for Nova apps
A Laravel Nova field for storing tags on a model in one column. This will be stored as a JSON string.
Installation
You can install the package via composer:
composer require marshmallow/nova-tags-field
Usage
Prepare your resources and models to make use of the taggable fields.
Nova Resource
Add the tags field to your Nova resource.
use Marshmallow\TagsField\Tags; public function fields(Request $request) { Tags::make('Tags'), }
Model
Cast the columns where you want to store your tags as an array. Otherwise creating resources will fail.
protected $casts = [ 'tags' => 'array' ];
Options
use Marshmallow\TagsField\Tags; public function fields(Request $request) { Tags::make('Tags')->addMoreText('Add another...'), }
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.
Credits
- All Contributors
- Package is based on nova-tags-field from Spatie
License
The MIT License (MIT). Please see License File for more information.