How to apply query to model if field not filtered
- by jdog
I have a range of modules running on generator.yml. In some of those I would like to hide records by default of Status: CLOSED (being the last of a range of Statuses). OF course if the user filters for CLOSED i want to show these records.
I thought it would make sense to apply andWhere('status_id=?',Status::CLOSED) in a specific table_method , but how do I access the filters of the module from within the model?
Is there a better way to do this?