06-03-2019, 04:30 AM

Hello everyone, This is related to codeigniter 4.

Actually I need to use same model but different functions (3 different functions) to get data in controller. I don't understand how to do it all 3 functions are for different tables. In codeigniter 3, I can easily get data from single model using different functions like this :

Can anyone please help me how to do it in Codeigniter 4.

Actually I need to use same model but different functions (3 different functions) to get data in controller. I don't understand how to do it all 3 functions are for different tables. In codeigniter 3, I can easily get data from single model using different functions like this :

PHP Code:

`$this->load->model('User_model');`

$this->model->data_function_one('table1');

$this->model->data_function_two('table2');

$this->model->data_function_three('table3');