Best place to put callback functions CodeIgniter - Grocery Crud |
Hello,
I'm new to CodeIgniter and I am in doubt about where is the best place to put the callback functions: Controller or Model? I'm using Grocery Crud to perform some of the crud actions, and it has it's own callback functions as well. Where is the best place to place these? Grocery crud is used on controller. The example bellow shows my doubt: Code: //I can call the model class and place the actual 'callback_after_insert' function there: Which one is the best practice? Thanks a lot!
If your dealing with database stuff then put it in your model.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |