This is my object
$User = DB::table('user_app')
->where('id',$request->get('token'))
->select('account_type','address','card_bank','code_melli','shahr as city','family','id','mobile','name','phone','role','ostan as state','zip_code')
->first();
This is my json respons
"user_data": {
"account_type": "real",
"address": "سناباد",
"city": null,
"family": "حسینی",
"id": 180,
"mobile": "09371521106",
"name": "الهام",
"phone": "0513845555",
"role": "usual",
"state": {
"id": 11,
"name": "خراسان رضوی"
},
"zip_code": "91387"
}
Now i want to put null property empty string for example instead of city put "" value for APIs... How could i do it