mardi 17 juillet 2018

Yii2 custom search filters via checkboxes

I'm working with Yii2 and I have a search model prepared to enable users to search/filter items from a certain model.

Now I need to add a few checkboxes that serve as switches for additional filters that, for example, allow hiding items created past a certain relative timeframe. (e.g. "older than 24 hours")

The model the search model is derived from does not contain attributes for a filter like that. How can I implement a switch like this that would enable/disable a custom filter for the request?




Aucun commentaire:

Enregistrer un commentaire