Filter
abstract class Filter (View source)
Base class for a Filter.
A filter is a set of filtering or sorting criteria that can be applied to a feed query, like "Newest" or "Top".
Define a new filter by extending this class and implementing the methods.
Use the PostFilters
and CommentFilters
extenders to register a filter
for the appropriate feed types, making them available for configuration.
Methods
string
handle()
The handle for the filter, used in query parameters.
string
label()
The text label for the filter.
void
apply(Builder $query)
Apply the filter to the feed query builder.
Details
string
handle()
The handle for the filter, used in query parameters.
abstract string
label()
The text label for the filter.
abstract void
apply(Builder $query)
Apply the filter to the feed query builder.