<?php
class Crud_model extends CI_Model{

  function get_kategori(){
    $hsl=$this->db->get('perkara');
    return $hsl;
  }
  function get_all_produk() {
        $this->datatables->select('nomor_perkara,tanggal_surat,pihak1_text,pihak2_text,petitum,tanggal_pendaftaran');
        $this->datatables->from('perkara');
               $this->datatables->add_column('view', '<a href="javascript:void(0);" class="edit_record btn btn-info btn-xs" data-kode="$1" data-nama="$2" data-harga="$3" data-kategori="$4">Edit</a>  <a href="javascript:void(0);" class="hapus_record btn btn-danger btn-xs" data-kode="$1">Hapus</a>','nomor_perkara,tanggal_pendaftaran,pihak1_text,pihak2_text,petitum');
        return $this->datatables->generate();
  }

}
