mahi / spatie-tags-nova-filter
A Laravel Nova filter for Spatie/Laravel-Tags.
Installs: 11 658
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 3
Open Issues: 2
Requires
- php: >=7.1.0
- spatie/laravel-tags: ^2.3|^3.0|^4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^1.20
README
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') ->withMeta([ 'withAnyTags' => false, 'tag_type' => null ]) ]; } }
License
The MIT License (MIT). Please see License File for more information.