Question and answer is powered by AnsPress.io
I am developing a custom library in codeigniter. Now, I want to access a model from here. How can I do that? Please help me.
Inside your custom library function define a variable like below
$CI =& get_instance();
Now load the model
$CI->load->model(‘Your_Model_Name’);
Now you can access this model function like this
$CI->Your_Model_Name->your_model_function();