nhance/app/Models/InsurerModel.php

34 lines
663 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class InsurerModel extends Model
{
protected $table = 'insurers';
protected $primaryKey = 'id';
protected $allowedFields = [
"id",
"type",
"name",
"short_name",
"created_by",
"updated_by",
"is_active",
];
public function getCreatedByUserName(){
return $this->db->table('insurers')
->select('insurers.*')
// ->select('user_profiles.first_name as user_name')
// ->join('user_profiles', 'user_profiles.id = clients.created_by')
->get()
->getResult();
}
}