📜  剩余时间 laravel 秒 - PHP 代码示例

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

代码示例2
//seconds and human time readable
$endTime = Carbon::parse("2021-09-23 19:15:16");
$startTime = Carbon::parse("2021-09-23 19:15:14");
$timeleft = $startTime->diffForHumans($endTime);
return $timeleft;
//output => time_left: "2 second before"