⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Message: Class 'grocery_CRUD' not found



luisjadames
  • profile picture
  • Member

Posted 10 December 2019 - 03:43 AM

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
class Main extends CI_Controller {
 
function __construc()
{
parent::__construc();
 
/* Standard Libraries of codeigniter are required */
$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');
 
}
public function index()
{
echo "<h1>Welcome to the world of Codeigniter</h1>"; //Just an example to ensure that we get into the function
die();
 
}
 
public function employees()
{
$crud =  new grocery_CRUD();
    $crud -> set_table ('employees');
$output = $this->grocery_CRUD->render();
 
echo "<pre>";
print_r($output);
echo "</pre>";
die();
 
}
}
 
/* End on file Main.php */
/* Location: ./application/controllers/main.php */