Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

A simple tag field. It stores your tags in a single column in your database. No relations, just a plain text field. Very handy for simple tagging of your resources 🥺

License

Notifications You must be signed in to change notification settings

marshmallow-packages/nova-tags-field

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alt text

A tags field for Nova apps

Version Issues Licence PHP Syntax Checker

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

License

The MIT License (MIT). Please see License File for more information.

About

A simple tag field. It stores your tags in a single column in your database. No relations, just a plain text field. Very handy for simple tagging of your resources 🥺

Resources

License

Stars

Watchers

Forks

Packages