resource; $data = [ 'nickname' => $model->users->nickname ? ($model->users->nickname . "(" . $model->users->truename . ")") : '', 'mobile' => $model->users->mobile ?? '', 'area_name' => $model->area->name ?? '', ]; return array_merge(parent::toArray($request),$data); } }