Download the PHP package dddeeemmmooonnn/nova-multicolumn-filter without Composer
On this page you can find all versions of the php package dddeeemmmooonnn/nova-multicolumn-filter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dddeeemmmooonnn/nova-multicolumn-filter
More information about dddeeemmmooonnn/nova-multicolumn-filter
Files in dddeeemmmooonnn/nova-multicolumn-filter
Package nova-multicolumn-filter
Short Description A Laravel Nova multicolumn filter.
License MIT
Informations about the package nova-multicolumn-filter
A Laravel Nova multicolumn filter
Filter for several columns
Demo
Installation
Run this command in your Laravel Nova project:
composer require dddeeemmmooonnn/nova-multicolumn-filter
Usage
Simplified:
Detailed:
Intended use: extend filter, add different options and operators, use it with column declaration in constructor. Or extend again, and add column declaration there.
Create a filter with artisan
Extend your filter from the NovaMulticolumnFilter and customize operators, options, columns.
Сomprehensive example:
Column options:
-
type - input type
- select - options required, operator
=
- date - using whereDate in apply() function
- checkbox - operator
=
- text, email, number and other \<input type="***"\/>
- select - options required, operator
-
label - column label
-
operators - list of column's operators. Array
['value' => 'label']
or string indicating method name. Method must be declared asoperatorsYourName
-
options - for
select
type, similarly operators, but method naming starts withoptions
-
defaultOperator
-
defaultValue
-
preset - preset columns when filter is empty, applied after opening filters menu
-
column - column name, if you want to use several types for one column
-
apply - custom apply method, that will filter the column
- placeholder - \<input> placeholder
Localization:
add to nova translation json file (resources/lang/vendor/nova/\<lang>.json)
Authors
- Dmitry Turov [email protected]
The filter inspired by philperusse/nova-column-filter and beyondcode/nova-filterable-cards