I would like to know…can I load the model in my constructor function instead of loading it for each function within that controller?
Lets say that I have 5 functions that use same model. Instad of loadin the same model in all 5 functions, should I load the controller in the construcor function like this?
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class BackOfficeUsers extends MY_Controller
// constructor function
public function __construct()
$this->load->model('backOfficeUsersModel'); // load it here??
} // end of constructor function
Is this good practice or no??