Welcome Guest, Not a member yet? Register   Sign In
Purpose of the model - less then in CI3?
#1

Sorry if this is a stupid question, but do we generally do less stuff in the model now compared to CI3?
For example would I do the sanitazion of  "Post data" in the controller now and not in the model?
PHP Code:
$data['fieldname'] = $this->request->getVar('fieldname'FILTER_SANITIZE_STRING);
$model->insert($data); 
Reply
#2

Why do you need to do the sanitization of "Post data" in the model?
Reply
#3

(06-17-2023, 01:55 AM)kenjis Wrote: Why do you need to do the sanitization of  "Post data" in the model?
Well,.. I don't have to, but I used to do all the data modelling in the Model with CI3. 
So, I understand your feedback as a confirmation to do that in the controller. Thanks!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB