counting time execution duration in time laravel

Solutions on MaxInterview for counting time execution duration in time laravel by the best coders in the world

showing results for - "counting time execution duration in time laravel"
Rafael
23 Nov 2020
1# 1. get initial time
2$start = now();
3
4  // code here ...
5
6# 2. get diff time from $start
7$time = $start->diffInSeconds(now());
8
9# 3. convert it in human readable
10$_format = \Carbon\CarbonInterval::seconds($time)->cascade()->forHumans();
11