📅  最后修改于: 2022-03-11 14:53:54.036000             🧑  作者: Mango
# 1. get initial time
$start = now();
// code here ...
# 2. get diff time from $start
$time = $start->diffInSeconds(now());
# 3. convert it in human readable
$_format = \Carbon\CarbonInterval::seconds($time)->cascade()->forHumans();