how check the time of operation in laravel

Solutions on MaxInterview for how check the time of operation in laravel by the best coders in the world

showing results for - "how check the time of operation in laravel"
Kailyn
06 Jan 2021
1$timeStart = microtime(true);
2
3App::finish(function() use ($timeStart) {
4    $diff = microtime(true) - $timeStart;
5    $sec = intval($diff);
6    $micro = $diff - $sec;
7    Log::debug(Request::getMethod() . "[" . Request::url() . "] Time: " . round($micro * 1000, 4) . " ms");
8});
9