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()