From 77d8f31b07822db672724636fff97482d71d3b84 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Wed, 14 Jan 2026 10:20:04 +0800 Subject: [PATCH] update --- app/Models/Company.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Models/Company.php b/app/Models/Company.php index 3f8daac..afaa617 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -12,11 +12,10 @@ class Company extends SoftDeletesModel public function getIsYhInvestedTextAttribute() { - $array = [ - 0 => '否', - 1 => '是', - ]; - return $array[$this->is_yh_invested] ?? '否'; + if (empty($this->is_yh_invested)) { + return '否'; + } + return $this->is_yh_invested == 1 ? '是' : '否'; } public function users()