Here is an open bug on Github for the laravel-mongodb package, but there is no response. Maybe someone knows a solution..?
When selecting as single doc, dates displays as a date
{
"_id": "5ca71ce0d542352064004034",
"title": "General review",
"status": "active",
"start_date": "2019-04-05 09:16:16.000000",
"end_date": "2038-01-19 03:14:07.000000",
"start_review_date": "2019-04-05 09:16:16.000000",
"submission_fee": 100,
"reward": 0,
"is_general_review_round": true,
"created_at": "2019-04-05 09:16:16.000000",
"updated_at": "2019-04-05 09:16:16.000000",
"proposals": [],
"demography": null
}
But on select as related object (nested array) I have this date conversion issue...
{
"title": "Omnis perspiciatis aut voluptatem dolores vel repudiandae.",
"start_date": {
"$date": {
"$numberLong": "1554542206000"
}
},
"end_date": {
"$date": {
"$numberLong": "1556183806000"
}
},
"start_review_date": {
"$date": {
"$numberLong": "1555406206000"
}
},
"updated_at": {
"$date": {
"$numberLong": "1554455806312"
}
},
"created_at": {
"$date": {
"$numberLong": "1554455806312"
}
}
}