EVOLUTION-NINJA
Edit File: Branch_model.php
<?php namespace App\Models; use CodeIgniter\Model; class Branch_model extends Model{ protected $table = 'gss_branches'; protected $primaryKey = 'branch_id '; protected $allowedFields = ['branch','delete_status', 'created_at','updated_at']; public function check_branch_exists($branch) { return $this->db->table('gss_branches') ->select('branch') ->like('LOWER(branch)', strtolower($branch)) ->where('delete_status', 'ACTIVE') ->get() ->getResult(); } public function get_branches_master() { $table = 'gss_branches'; $where = array('delete_status'=>'ACTIVE'); $result = $this->gss_model->get_where_result($table,$where); if($result) { echo json_encode($result); } else { echo json_encode(array('result'=>0)); } } }?>