Welcome Guest, Not a member yet? Register   Sign In
Is a beforeFind on a Model a bad idea?
#1

Reworking one project into a pure front/back-end solution with a REST API in CI4 I have been thinking about a way to implement searching and paging of the data returned by find. I have currently a working solution by creating a clone of Model::findAll() and handling paging there. Working, but not the nicest maybe.
Thinking about other possibilities, I wonder why there isn't a beforeFind event where I can get access to the QueryBuilder object to allow manipulation of the find parameters.
What am I missing?

/Mattias
Reply


Messages In This Thread
Is a beforeFind on a Model a bad idea? - by tgix - 06-29-2020, 10:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB