So i use sqlserver + laravel for my api running on Ubuntu 20.04 (apache2)
i have table1 with 2 columns , first column name is lets say date1(Date) and second one is date2(Datetime).
i use eloquent to retrieve data:
$result =MyModel::get();
and then response()->json($result);
the result is here :
{
"date1": "Oct 11 2023 12:00:00:AM",
"date2: "2023-10-11T05:55:56.000000Z"
}
but what i wanted is :
{
"date1": "2023-10-11",
"date2: "2023-10-11T05:55:56.000000Z"
}
what should i do to achieve this kind of behavior? this is happen on my new linux server (20.04) the old one is also Ubuntu 20.04 but working just fine... i've configured php,sqlserver,and my new linux server date,timezone,locales ... etc matched the old one.
any help or guide guys?