I've controller like this
function view()
{
if($this->tank_auth->get_user_role_id() == 1){
$users = null;
}else{
$users = $this->_get_users_id();
}
//count total rows of transaction list
$this->db->where('user_id',$users);
$this->db->from('book_packages');
$config['base_url'] = base_url().'index.php/transaction/view';
$config['total_rows'] = $this->db->count_all_results();
$config['per_page'] = 10;
$config['uri_segment'] = 3;
$config['num_links'] = 1;
/* this is config tag */
$this->pagination->initialize($config);
$data['total_rows'] = $config['total_rows'] ;
$data['title'] = 'List transaction';
$data['text'] = $this->transaction_model->view_transaction($config['per_page'],$this->uri->segment(3),$users);
$data['pagecontent'] = "admin/view_transaction";
$this->load->vars($data);
$this->load->view('template');
}
I echo this in the view $this->pagination->create_links();
when I load the controller I got error like this
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Transaction::$pagination
Filename: controllers/transaction.php
Line Number: 804
Fatal error: Call to a member function initialize() on a non-object in my directory
I don't know why, I already load the library pagination, helper url, the name of class with capital. and it's happen when I upload my code to hosting, but I not get any error when I load it in localhost.
any help are really appreciated. Thank you very much.