In my application I am having an controller responsible for error Unable to locate the model you have specified: Grocery_CRUD_Model however I am not specifying any type of model naming Grocery_CRUD_Model
My controller:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class ExecutiveMembers extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->model('CommitteeMembers');
$this->load->library('grocery_CRUD');
}
public function _example_output($output = null)
{
$this->load->view('members_view', $output);
}
public function index()
{
try {
$crud = new grocery_CRUD();
$crud->set_theme('bootstrap');
$crud->set_table('ExecutiveMember');
$crud->unset_add();
$crud->unset_edit();
$crud->columns('member_name', 'member_designation');
$crud->add_action('Update', '', 'ordered_products/update_order', 'ui-icon-plus');
$crud->display_as('member_name', 'Member Name')
->display_as('member_description', 'Member Designation');
$crud->set_subject('Members Details');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
}
Error
Unable to locate the model you have specified: Grocery_CRUD_Model --- #0 /home/drkkayani/public_html/ClubApp/application/libraries/Grocery_CRUD.php(484): CI_Loader->model('grocery_CRUD_Mo...') #1 /home/drkkayani/public_html/ClubApp/application/libraries/Grocery_CRUD.php(4425): grocery_CRUD_Model_Driver->set_default_Model() #2 /home/drkkayani/public_html/ClubApp/application/libraries/Grocery_CRUD.php(4443): Grocery_CRUD->pre_render() #3 /home/drkkayani/public_html/ClubApp/application/controllers/ExecutiveMembers.php(34): Grocery_CRUD->render() #4 [internal function]: ExecutiveMembers->index() #5 /home/drkkayani/public_html/ClubApp/system/core/CodeIgniter.php(514): call_user_func_array(Array, Array) #6 /home/drkkayani/public_html/ClubApp/index.php(292): require_once('/home/drkkayani...') #7 {main}