If you want to measure the timing of some code in Laravel , you can use debugbar measure function
Debugbar::startMeasure('start'); Debugbar::stopMeasure('stop');
but if, for any reason, you can’t use debugbar, you can go back to pure php and use this code
$start = microtime(true); $time_elapsed_secs = microtime(true) - $start;