Available Filters
LaraGrid provides several filter classes out of the box:
BaseFilter: This is the abstract base class for all filter types. It defines the basic structure and methods that all filters must have. It has methods like
setBuilder
which sets a closure that modifies the query builder based on the filter's value.TextFilter: This class extends
BaseFilter
and is used for filtering text fields. It sets the filtration type by default toLIKE
and filter type toTEXT
.
SelectFilter: This class extends
BaseFilter
and is used for filtering select fields. It sets the filtration type by default toEQUAL
and filter type toSELECT
. It also has methods to set options for the select filter.
DateFilter: This class extends
BaseFilter
and is used for filtering date fields. It sets the filtration type bu default toDATE_BETWEEN
and filter type toDATE
.
BooleanFilter: This class extends
SelectFilter
and is used for filtering boolean fields. It sets predefined options for boolean values.
Filter Types
LaraGrid defines an enum class FilterType
that lists the types of filters available: TEXT
, SELECT
, and DATE
.
Filtration Types
LaraGrid defines an enum class FiltrationType
that lists the types of filtrations available: LIKE
, EQUAL
, and DATE_BETWEEN
.
Last updated