the_mechanic/app/Models/ComplaintModel.php

18 lines
600 B
PHP
Executable File

<?php
namespace App\Models;
use CodeIgniter\Model;
class ComplaintModel extends Model
{
protected $table = 'complaints';
protected $primaryKey = 'complaint_id';
protected $allowedFields = ['complaint_id','business_id','name','labour_charge','cgst','sgst','tax','labour_cost_with_tax','isactive','cubic_capacity_id'];
public function getCubiccapacityName()
{
return $this->db->table('cubic_capacity')
->select('cubic_capacity.*')
->where('cubic_capacity.isactive', 1)
->get()
->getResultArray();
}
}