Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
S

Spatie Tags Filter

Installation Instructions

composer require helios-live/php-nova-spatie-tags-filter

Readme

NovaSpatieTagsFilter

Works with Laravel Nova 4.
Borrowed heavily from https://github.com/Mahi-Mahi/SpatieTagsNovaFilter.

This package allows you to filter resources by tags.

Using the awesome Spatie/laravel-tags and vueform/multiselect

Installation

First you must install spatie/laravel-tags into your Laravel app. Here are the installation instructions for that package.

Next, you can install this package in to a Laravel app that uses Nova via composer:

composer require helios-live/php-nova-spatie-tags-filter

Usage

After the package has been installed with Composer, simply register the filter in your resource:

use HeliosLive\PhpNovaSpatieTagsFilter\PhpNovaSpatieTagsFilter;

class MyResource extends Resource
{
    /**
     * Get the filters available for the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function filters(Request $request)
    {
        return [
            (new PhpNovaSpatieTagsFilter)
                ->label('Tags')
                // ->placeholder('')
                ->withMeta([
                    'withAnyTags' => true, // true, false, "never"
                    'tag_type' => null
                ])
        ];
    }
}

License

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

Back to Top
Added 2 years ago
Last updated 2 Years Ago
Version v1.0.1
Nova Version ^4.0
Composer
helios-live/php-nova-spatie-tags-filter
GitHub stars 0
Packagist downloads 7,993

Favorites

0 users favorited

Rating

N/A
(out of 5)
★★★★★
★★★★
★★★
★★
0 ratings

Contributors

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas