dbmsv4/app/Helpers/Customer/AccountHelper.php
2025-11-18 18:06:17 +09:00

29 lines
758 B
PHP

<?php
namespace App\Helpers\Customer;
use App\Helpers\CommonHelper;
class AccountHelper extends CommonHelper
{
public function __construct()
{
parent::__construct();
}
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
{
switch ($field) {
case 'amount':
$value = number_format($value) . "";
break;
default:
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
break;
}
if (is_array($value)) {
throw new \Exception(__METHOD__ . "에서 오류: {$field}의 값이 Array형태입니다");
}
return $value;
}
}