%PDF-1.4
Directory : /var/www/vhosts/lautnusantara.com/httpdocs/mis/app/Models/ |
<?php namespace App\Models; use CodeIgniter\Model; class Layanan_Model extends Model { public function get_layanan($id = false) { $builder = $this->db->table('ssn_news_statis'); $builder->select('*'); if($id!=false) { $builder->where('ssn_news_statis.id',$id); } $builder->where('ssn_news_statis.catid','2'); $builder->where('ssn_news_statis.trash','0'); $builder->orderBy('ssn_news_statis.id', 'ASC'); return $builder->get(); } public function save_layanan($data) { $query = $this->db->table('ssn_news_statis')->insert($data); return $query; } public function update_layanan($data,$id) { $query = $this->db->table('ssn_news_statis')->update($data, array('id'=> $id)); return $query; } public function delete_layanan($data,$id) { $query = $this->db->table('ssn_news_statis')->update($data, array('id'=> $id)); return $query; } } ?>