-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
return response()->json([
'invoice' => Invoice::where('_user_id', '677bc826c707fd89b70ce9ed')->first()
]);
With the example code above, I am returning a response to the mobile application API.
The response output is as follows:
Previously, in our mobile application, we accessed it with _id, but now it is all changed to id.
My problem is that I want to use _id in the JSON responses.
{
"invoice": {
"_company_id": null,
"_user_id": "677bc826c707fd89b70ce9ed",
"number": 4015097219,
"name": "Savaş Dersim Çelik",
"first_name": "Savaş Dersim",
"last_name": "Çelik",
"business_name": "SDC Yazılım",
"tax_office": "Çanakkale",
"tax_number": "3479509471",
"accounting_mail": "savas.celik@mealbox.com.tr",
"phone_prefix": "+90",
"phone": "5178614619",
"city_name": "İstanbul",
"district_name": "Kadıköy",
"address": null,
"location": [],
"latitude": "0.00",
"longitude": "0.00",
"erp_code": 0,
"postcode": null,
"is_active": true,
"notes": "",
"is_individual": false,
"deleted_at": null,
"_created_by": "677bc826c707fd89b70ce9ed",
"updated_at": "2025-01-06T20:28:48.887000Z",
"created_at": "2025-01-06T20:28:48.887000Z",
"id": "677c3d001c41ec816d0d6a1f"
}
}
Metadata
Metadata
Assignees
Labels
No labels