Is there way to autoapply filter based on url params?
Example:
CRUD url is /users
if we go to /users?status=Active I would like to show all users filtered by this status.
Filtering from get params
- Single Page
Posted 19 April 2017 - 17:18 PM
Posted 21 April 2017 - 06:50 AM
Maybe you can check $_GET with a conditional or switch to set $crud->where() ?
Posted 24 April 2017 - 09:10 AM
Well it surely is a good option.. and i will recommend 1 more thing, add the same value to the session. There might be a possibility that you may loose the value in next call if it still dose not persist. So the best option i found was ... if there is a parameter, just push it to the session.. if there is no parameter.. and its not a call from same controller, just reset the param value from the session.
Happy GCing :)