📜  laravel 时间格式 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:36.290000             🧑  作者: Mango

代码示例4
//before
$data->created_at; // 2021-12-14 00:00:00

//after
$data->created_at->format('Y-m-d'); //2021-12-14
$data->created_at->format('H:i:s'); //00:00:00