This commit is contained in:
VENKATESHWARAN 2025-10-31 17:18:46 +05:30
parent 6c1ecac7a1
commit 37159dc1c5
2 changed files with 13 additions and 1 deletions

View File

@ -886,3 +886,15 @@ if (!function_exists('removeNumberFormatting')) {
return (float) str_replace(',', '', trim($number));
}
}
if (!function_exists('formatKey')) {
function formatKey($key, $len = 3)
{
$words = explode('_', $key);
$formatted = array_map(function ($word) use ($len) {
return strlen($word) < $len ? strtoupper($word) : ucfirst(strtolower($word));
}, $words);
return implode(' ', $formatted);
}
}

View File

@ -27,7 +27,7 @@ class InsurerBranchModel extends Model
public function getInsurerBranchesWithInsurerNames()
{
$query = $this->select('insurer_branch.*, I.short_name as insurer_name')
$query = $this->select('insurer_branch.*, I.short_name as insurer_name, I.category')
->join('insurers I', 'insurer_branch.insurer_id = I.id', 'left')
->find();
return $query;