• 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is a beforeFind on a Model a bad idea?

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?


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.