28 lines
664 B
PHP
28 lines
664 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
|
|
class BusinessModel extends Model
|
|
{
|
|
protected $table = 'business';
|
|
protected $primaryKey = 'business_id';
|
|
protected $allowedFields = ['business_id','title','email','mobile_no','terms','address','city','state','postal_code' ,'business_logo','isactive', 'pan_no', 'org_reg_no', '80G', 'signature'];
|
|
|
|
public function insertBusiness($data)
|
|
{
|
|
return $this->insert($data);
|
|
}
|
|
public function getBranchesByBusinessId($businessId)
|
|
{
|
|
return $this->db->table('business_branches')
|
|
->where('business_id', $businessId)
|
|
->get()
|
|
->getResultArray();
|
|
}
|
|
|
|
|
|
}
|
|
?>
|