Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class Demo extends CI_Controller {
- public function __construct() {
- parent::__CONSTRUCT();
- $this->load->model('wilayah_m', 'region');
- }
- public function index() {
- $this->load->view('demo_datatable');
- }
- function ajax_data() {
- //if you use GET or other method.. just edit this
- $params = $this->input->post();
- $model = 'region';
- $result = $this->$model->_datatables($params);
- //erase what you think is not use
- unset($result['raw']);
- unset($result['params']);
- unset($result['time']);
- //unset($result['sql']);
- echo json_encode($result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement