Skip to content

Instantly share code, notes, and snippets.

@glynrob
Created January 24, 2012 20:46
Show Gist options
  • Save glynrob/1672469 to your computer and use it in GitHub Desktop.
Save glynrob/1672469 to your computer and use it in GitHub Desktop.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Cms extends CMS_Controller {
public function index()
{
$this->load->model('Example','',TRUE);
$allRecords = $this->Example->getAll();
$idOne = $this->Example->getById(1);
$data = array(
'allRecords' => $allRecords,
'idOne' => $idOne
);
$this->load->view('cms_page',$data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment