Skip to content

Instantly share code, notes, and snippets.

@scoumbourdis
Last active November 19, 2019 05:26
Show Gist options
  • Save scoumbourdis/1b78b40f15df38f22f743854bfb59e4f to your computer and use it in GitHub Desktop.
Save scoumbourdis/1b78b40f15df38f22f743854bfb59e4f to your computer and use it in GitHub Desktop.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Examples extends CI_Controller {
function __construct() {
parent::__construct();
/* Standard Codeigniter Libraries */
$this->load->database();
$this->load->helper('url');
$this->load->library('grocery_CRUD');
}
private function _example_output($output = null) {
$this->load->view('example.php',$output);
}
public function offices() {
$crud = new grocery_CRUD();
$crud->set_table('offices');
$output = $crud->render();
$this->_example_output($output);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment