SpatieTagsNovaFilter
This package allows you to filter resources by tags. (using the awesome Spatie/laravel-tags and Vue-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 mahi/spatie-tags-nova-filter
Usage
After the package has been installed with Composer, simply register the filter in your resource:
use Mahi\SpatieTagsNovaFilter\SpatieTagsNovaFilter;
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 SpatieTagsNovaFilter)->label('Tags')
];
}
}
License
The MIT License (MIT). Please see License File for more information.