column('name','value'); Cache::set('WORKER_EXP_TYPE', json_encode($status,true),5); } else { $status = json_decode($default,true); } return $status[$data['maintain_exp_type']] ?? ''; } public function getOtherExpTypeTextAttr($value,$data):string{ $default = Cache::get('WORKER_OTHER_EXP_TYPE'); if (!$default) { $status = DictData::whereIn('type_value', 'worker_other_exp_type')->column('name','value'); Cache::set('WORKER_OTHER_EXP_TYPE', json_encode($status,true),5); } else { $status = json_decode($default,true); } return $status[$data['other_exp_type']] ?? ''; } public function getCityTextAttr($value,$data):string{ $default = Cache::get('CITY'); if (!$default) { $status = DictData::whereIn('type_value', 'city')->column('name','value'); Cache::set('CITY', json_encode($status,true),5); } else { $status = json_decode($default,true); } return $status[$data['city']] ?? ''; } public function getVehicleTypeTextAttr($value,$data):string{ $default = Cache::get('WORKER_VEHICLE_TYPE'); if (!$default) { $status = DictData::whereIn('type_value', 'worker_vehicle_type')->column('name','value'); Cache::set( 'WORKER_VEHICLE_TYPE', json_encode($status,true),5); } else { $status = json_decode($default,true); } return $status[$data['vehicle_type']] ?? ''; } }