diff --git a/app/common/model/cost_project/CostProject.php b/app/common/model/cost_project/CostProject.php index 4014a275b..83a50ac9c 100644 --- a/app/common/model/cost_project/CostProject.php +++ b/app/common/model/cost_project/CostProject.php @@ -73,7 +73,9 @@ public function getPersonTextAttr($value, $data): string { - $person = Admin::where('id', 'in', json_decode($data['person'], true))->column('name'); + if(isset($data['person']) && !empty($data['person'])){ + $person = Admin::where('id', 'in', json_decode($data['person'], true))->column('name'); + } return !empty($person) ? implode(',', $person) : ''; } } \ No newline at end of file