Filters
trait Filters
Properties
| Collection|array | $filters | Collection of defined filters. |
|
| bool | $has_filters | ||
| bool | $show_filters |
Methods
Initialize filters.
Identify the column key from a filter label.
Handle updates to filter inputs.
Apply filters to the data collection (Array/Collection mode).
Get a fresh instance of filters with current state merged.
Apply filters to the Eloquent query.
Clear all active filters and search.
Details
at line 28
void
setFilters()
Initialize filters.
Processes defined filters, resolving keys, options (for magic-select), and serializing them for Livewire.
at line 141
string
getColumnKey(string $filter_label)
Identify the column key from a filter label.
at line 161
void
updatedFilters(string $key, mixed $value)
Handle updates to filter inputs.
Triggered by Livewire when filter properties change.
at line 210
Collection
applyFilters(Collection $data)
Apply filters to the data collection (Array/Collection mode).
at line 270
Collection
getFreshFilters()
Get a fresh instance of filters with current state merged.
Re-initializes filters (e.g. to get closures back) and merges the Livewire state (inputs).
at line 316
Builder
applyFiltersToQuery(Builder $query)
Apply filters to the Eloquent query.
at line 419
void
clearAllFilters(bool $selectAll = false)
Clear all active filters and search.