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 35
void
setFilters()
Initialize filters.
Processes defined filters, resolving keys, options (for magic-select), and serializing them for Livewire.
at line 154
string
getColumnKey(string $filter_label)
Identify the column key from a filter label.
at line 174
void
updatedFilters(string $key, mixed $value)
Handle updates to filter inputs.
Triggered by Livewire when filter properties change.
at line 219
Collection
applyFilters(Collection $data)
Apply filters to the data collection (Array/Collection mode).
at line 276
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 317
Builder
applyFiltersToQuery(Builder $query)
Apply filters to the Eloquent query.
at line 416
void
clearAllFilters(bool $selectAll = false)
Clear all active filters and search.