Hello
This is my controller code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->model('grocery_crud_model');
$this->load->library('grocery_CRUD');
}
public function _example_output($output = null)
{
$this->load->view('example.php',$output);
}
public function index()
{
redirect('main/address');
}
public function address()
{
try{
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('data');
$crud->set_subject('آدرس');
$crud->required_fields('name','type','address');
$crud->set_relation('type','groups','name');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
}<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->database();
$this->load->helper('url');
$this->load->model('grocery_crud_model');
$this->load->library('grocery_CRUD');
}
public function _example_output($output = null)
{
$this->load->view('example.php',$output);
}
public function index()
{
redirect('main/address');
}
public function address()
{
try{
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('data');
$crud->set_subject('آدرس');
$crud->required_fields('name','type','address');
$crud->set_relation('type','groups','name');
$output = $crud->render();
$this->_example_output($output);
}catch(Exception $e){
show_error($e->getMessage().' --- '.$e->getTraceAsString());
}
}
}
Now I get:
Unable to locate the model you have specified: Grocery_crud_model
How can I fix it?
