resource; $data = [ 'area_name' => $model->areas->name ?? '', 'arr_ids' => empty($model->ids)? [] : json_decode($model->ids) ]; return array_merge(parent::toArray($request),$data); } }